PDA

View Full Version : Set the last column of a treeview to minimal size



Donner
21st August 2010, 11:03
Hi,

I have a QTreeView with 2 columns - is it possible to set the width of the last column exactly the width of the biggest cell in the second column and let the first column take all the other space?

Thanks a lot,
D.

Lykurg
21st August 2010, 23:08
Hi, see QHeaderView::ResizeToContents and QHeaderView::Stretch with QHeaderView::setResizeMode()