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
Qt Code:
  1. My tree view
  2.  
  3. Item Data1 Data2 Result
  4. |- a 1 1 TRUE //<-- delegate
  5. | |-a1 1 2 FALSE
  6. |-b 2 2 FALSE
To copy to clipboard, switch view to plain text mode 

baray98