Thanks for your answer, this cleared some things for me.
Well, this was not my ideaWhy do you want to define the model as a QAbstractItemModel and not as a QStandardItemModel?I grabbed some code from Qt's build-in examples, this one was from itemviews/chart/mainwindow.h and mainwindow.cpp.
This is done with QModelIndex(), right? I have to read about that first. Does a model assign an QModelIndex to its items automatically or do I have to create one?Let the model add the indexes for you and use appendItem or insertItem.
Kind regards,
HomeR




I grabbed some code from Qt's build-in examples, this one was from itemviews/chart/mainwindow.h and mainwindow.cpp.
Reply With Quote
Bookmarks