سؤال

Inside QTreeWidget implementation, after receiving the signal "item selection changed" and "item selected", it positions the scroll down to put the selected item just in the bottom.

It there is no scrollbar, everything goes perfect. Does nothing.

I tried many approaches, but it is changed just after i receive those selection signals and position the ScrollBar where i want.

How can i avoid qt doing that? It is very annoying to select something and then seeing it moving around, not staying in the same position i clicked!.

I understand if it does it when you select an item which is not visible. But i want to choose what to do!.

هل كانت مفيدة؟

المحلول

Try to set the autoScroll property to false.

treeWidget->setAutoScroll(false);

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top