baray98
6th June 2009, 04:33
Guys,
I have an app that uses QTreeView and MyModel ( a subclass from QAbstractItemModel)
I have 4 columns in my modelItem and I want to let the 4th column to show true when the value of col 2 and 3 are the same and FALSE otherwise.
My plan is to populate my model with col 1 to 3 then In my view i would use a delegate on col 4 that will look at cols 2 and 3 and decide if its true or false.
Is this doable? any other advise from the experts.
example
My tree view
Item Data1 Data2 Result
|- a 1 1 TRUE //<-- delegate
| |-a1 1 2 FALSE
|-b 2 2 FALSE
baray98
I have an app that uses QTreeView and MyModel ( a subclass from QAbstractItemModel)
I have 4 columns in my modelItem and I want to let the 4th column to show true when the value of col 2 and 3 are the same and FALSE otherwise.
My plan is to populate my model with col 1 to 3 then In my view i would use a delegate on col 4 that will look at cols 2 and 3 and decide if its true or false.
Is this doable? any other advise from the experts.
example
My tree view
Item Data1 Data2 Result
|- a 1 1 TRUE //<-- delegate
| |-a1 1 2 FALSE
|-b 2 2 FALSE
baray98