Hi,
I am trying to make a tree for my data objects, but I am having trouble figuring out how I should approach it to make it as clean as possible. I was using a QTreeWidget, but it felt very hackish and wasn't very nice to keep up with. I'd like to use a QTreeView, but I am unsure of how to handle the models. An example of how my data classes work is below.
- data class 1
- group
- sub-data class 1
- group
- sub-sub-data class 1
- group
- group
- data class 2
- group
- group
- group
At the root, there are the large data classes, then there are groups of related data classes within that (the groups keep unrelated data classes from grouping together). When a data class is added, it needs to build its subtree of data and groups. the group "labels" cant be selected, but the data classes each have a widget for editing the internal data. How should I design the model to handle this?
--MathStuf
Edit: Typoed QList* rather than QTree*
Bookmarks