PDA

View Full Version : QtreeWidget Hierarchy Change



jc
20th January 2011, 03:34
Can anyone suggest a super simple way to determine when the hierarchy in a vanilla QTreeWidget changes in Qt 4.6. This would typically be with a (non-programmatic) internal move of a QTreeWidgetItem by the user. In particular, I need to determine the new parent of a relocated QTreeWidgetItem.

If possible, would like to avoid reimplementing parts of drag and drop.

Lykurg
20th January 2011, 10:39
Hi,

I am currently not sure, but doesn't the move affect the underlaying model? If so you could use e.g. the signal QAbstractItemModel::rowsMoved() to get notified.