Thanks. Follow-up questions,
1) I want to setCheckable on the tree top level nodes to true when it has children + when check/uncheck a parent's checkbox, all children will be checked/unchecked accordingly. Do I have to subclass QStandardItem?
2) Children node always has a checkbox or radiobox, and toggling child node checkbox/radiobox won't change its parent checked state. Do I have to subclass QStandardItem?
3) when create a child node, I want to use a different default icon and/or naming convention by the parent's type (i.e. Squares, Circles, ...). I don't want to just rely on the name of the parent's node if I don't have to. If so, can I use QStandardItem then somehow utilizing Qt role/type OR do I need to subclass QStandardItem?
In general, I want to avoid subclassing QStandardItem, QStandardItemModel, and QTreeView unless I have to.
Bookmarks