Hello,
I have a very annoying problem (4.2.1). I have alot of items in my treewidget and the user can select an item and remove it from the view. I just call QTreeWidget::takeTopLevelItem(index) and the item gets removed BUT assuming the item was somewhere down the list and after removing it, the treewidget automatically scrolls to the top of the list.
I even tried this:
Qt Code:
int y = treewidget->verticalScrollBar()->value(); treewidget->takeTopLevelItem(index); treewidget->verticalScrollBar()->setValue(y);To copy to clipboard, switch view to plain text mode
But it doesn't make any difference. I also dumped the variable y into a file and it always said valid values like 863, 672 ...
It's really annoying and in Qt3/QListView this never happened. Thank you guys.
Bookmarks