userx
userx

Reputation: 886

Setting autoscroll in QTreeWidget

I am using QTreeWidget with single column. QTreeWidgetItem has multiple childs in some situations. I am updating dynamically, data in every QTreeWidgetItem. Now when I am adding this data to particular child & I am expanding it. But I am unable to set scroll to that particular QTreeWidgetItem.

Is it possible?

Thanx in advance.

Upvotes: 0

Views: 1289

Answers (1)

ekhumoro
ekhumoro

Reputation: 120768

Use scrollToItem. You can pass a scroll-hint as the second argument to control how the scrolling is done:

    treewidget.scrollToItem(item, QtGui.QAbstractItemView.PositionAtCenter)

Upvotes: 2

Related Questions