0

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.

userx
  • 806
  • 1
  • 11
  • 23

1 Answers1

2

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)
ekhumoro
  • 115,249
  • 20
  • 229
  • 336