PDA

View Full Version : QTreeView and QAbstractItem Model.



Terabyte
13th January 2009, 13:00
Hi,
I'm doubleclicking on a QTreeView and getting a QModelIndex as a paramater. using the SIGNAL() DoubleClicked(QModelIndex),

How can I use this QModelIndex to retreive the correct TreeItem from my model (it's an n-ary tree).

aamer4yu
13th January 2009, 13:18
You can use QModelIndex::data .
Also QModelIndex::internalPointer , refer Qt Demo examples, Simple DOM Model