hi there!
I had a look at some other threads concerning my question but still I'm not sure how to get this working.
I'm doing an application where I have got a QTreeView in QSplitter. The Tree should fill itself up with data from a QList<QString> and it's depth will be just 1, there should be 2 more columns with checkboxes for the children so:
column0 column1 column2
parent
child checkbox checkbox
child checkbox checkbox
child checkbox checkbox
parent
child checkbox checkbox
parent
child checkbox checkbox
child checkbox checkbox etc.
and the checkboxes should be editable and other elements in the QSplitter will change according to what checkboxes are checked.
So should I implement my own Model and somehow override the flags or is it better to do it just using the QStandardItemModel and then model->setIndexWidget(index,QCheckbox) but then I can't get the children's indexes, it just works for the parents.
Maybe someone's done something similar and could send me a sample?




Reply With Quote
Bookmarks