![]() Registered Member ![]()
|
Hi, it's me again with a new question.
I reimplemented the QAbstractItemModel here is a part of the code:
I call this function with this code:
If I call index(0, 0, QModelIndex()) it should give me a pointer to the first entry in my QList: trueParents.first() But it doesn't. if (!parent.isValid()) This is answered with no, so this means that QModelIndex() is valid. But why is it valid? I don't understand. |
![]() Administrator ![]()
|
It works with the MenuModel used in System Settings. ( code at websvn.kde.org/trunk/KDE/kdebase/workspace/systemsettings/core/ in MenuModel.cpp )
Try starting with negative numbers instead of "0"'s.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]