Hi,
I have a QTreeView that is populated by setModel:

Qt Code:
  1. model = new MyModel();
  2. 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:
Qt Code:
  1. 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