mromanuk
9th March 2011, 16:55
I have a list of items of a custom type like this:
Provider1, Client1
Provider2, Client1
Provider3, Client2
...
this can be done with list model, but each one of this provider could also have some "items" like this:
Provider 1
item1, place, type, date
item2, place, type, date
...
Conforming a tree:
Provider
-> items
Provider 2
-> items
...
What do you think is the best way to implement the model?
Should I make just 1 type of Item (sublcassing QAbstractItemModel)?
Change the behavior (accepting corresponding attributes) depending on the hierarchy?
Thanks in advance
Provider1, Client1
Provider2, Client1
Provider3, Client2
...
this can be done with list model, but each one of this provider could also have some "items" like this:
Provider 1
item1, place, type, date
item2, place, type, date
...
Conforming a tree:
Provider
-> items
Provider 2
-> items
...
What do you think is the best way to implement the model?
Should I make just 1 type of Item (sublcassing QAbstractItemModel)?
Change the behavior (accepting corresponding attributes) depending on the hierarchy?
Thanks in advance