That actually works. Thanks a lot!
A bit of a weird API forcing it to be only the first column, but I can get around it. Also seems to be reset when the model is reset which is also annoying.
That actually works. Thanks a lot!
A bit of a weird API forcing it to be only the first column, but I can get around it. Also seems to be reset when the model is reset which is also annoying.
Well, yeah. A model reset tells all views that everything they know is wrong, and they have to go back and ask for it all again. And the method lives in the view and not the model because you may not want all views of the model to have this behavior.Also seems to be reset when the model is reset which is also annoying.
The best solution is to probably derive from QTreeView and override reset() and/or dataChanged(). Call the base class method first, then add your first row spanning.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
I ended up connecting to the rowsInserted/dataReset signals from the model and fix-up the spanning for the first column accordingly. It is sufficient for my case now and it looks quite good.
Thanks a lot again
Bookmarks