Hi, I have a QTreeView with a QStandardItemModel. Since the entries in the top level items can be a little long (and all columns except the first one are empty) I would like them to use the space of the other columns as well instead of just the first column:
This is what I've got:
Col1 | Col2 | Col3
>Top_Le... |
>0 | 1 | 2
>3 | 4 | 5
>6 | 7 | 8
Col1 | Col2 | Col3
>Top_Le... |
>0 | 1 | 2
>3 | 4 | 5
>6 | 7 | 8
To copy to clipboard, switch view to plain text mode
This is what I want:
Col1 | Col2 | Col3
>Top_Level_With long_Text
>0 | 1 | 2
>3 | 4 | 5
>6 | 7 | 8
>2nd_Top_Level_With long_Text
>0 | 1 | 2
>3 | 4 | 5
>6 | 7 | 8
Col1 | Col2 | Col3
>Top_Level_With long_Text
>0 | 1 | 2
>3 | 4 | 5
>6 | 7 | 8
>2nd_Top_Level_With long_Text
>0 | 1 | 2
>3 | 4 | 5
>6 | 7 | 8
To copy to clipboard, switch view to plain text mode
In QTableView there is a method to set span on the cells, but I haven't found anything similar in QTreeView. I could use QTableView, but I like the expanding/collapsing feature of the tree.
Ginsengelf
Bookmarks