Hi,
I have a QTreeView that is populated by setModel:
model = new MyModel();
myTreeView->setModel(model);
model = new MyModel();
myTreeView->setModel(model);
To copy to clipboard, switch view to plain text mode
When I do this the first time, my model is empty, but is subsequently filled.
The tree view appears as expected.
However, when I do this with a model that is not empty, I find that unwanted
and unneccesary horizontal scrollbars are appearing - the row is not wide
enough to warrant one.
If I do:
myTreeView->resizeColumnToContents(0);
myTreeView->resizeColumnToContents(0);
To copy to clipboard, switch view to plain text mode
the scrollbars go away, but I don't want to have to force my larger items to be
fully open. Any pointers?
Thanks in advance
Bookmarks