[Qt-interest] QTreeWidgetItem, setSelected(true) does not expand parents

Murat Uenalan murat.uenalan at googlemail.com
Thu Jan 15 21:21:03 CET 2009


I have a QGraphicsView with QGraphicsItem which are also listed in a
corresponding QTreeWidget on the side.
So when I click on a the QGraphicsItem, the corresponding QTreeWidgetItem
should be highlighted (ie. selected).
The problem is that the QGraphicsItems are children of a parent, which might
be collapsed. As here:

+parent

contra

.parent
|
'-- leaf

Is there any standard method to expand all parents and bring the widget in
the, lets say, center of the QTreeWidget ? So it is sure that the item is
visible in any circumstance ? Otherwise I propose
QTreeWidgetItem::takeEyespot(false) which unburries the item and brings it
into the eyespot.

Thanks for any help,
Mu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090115/937c93f9/attachment.html 


More information about the Qt-interest-old mailing list