QTreeView column sizes
-
-
You could make the colored dots to be returned for
Qt::DecorationRole
of the first column in your model, instead of being a separate column. this way they become part of the item and it gets indented as a whole. -
The thing is, that i need this dots to be separate items, since they are used as clickable buttons. I tried to inherit from QTreeView and override drawRow, but when i do that, i need to override visualRect, indexAt and some other methods too, and that's realy inconvenient. Is there another way to reach my goals with QTreeView , or do i need to inherit from QAbstractItemView, and implement this kind of TreeView myself?