QTreeView column content size
Unsolved
General and Desktop
-
wrote on 19 Nov 2015, 17:27 last edited by
Dear Qt users,
How can I get the optimal width of a QTreeView column so that each item are visible ?
sizeHintForColumn(ii)
gives me a smaller width than the optimal.I want the one I could have if I'd call ResizeToContent.
Thanks by advance
-
Hi,
Not a direct answer but why not call resizeColumnToContents(ii) directly ?
-
wrote on 20 Nov 2015, 09:15 last edited by
My TreeView is floating and I want its maximun width to be synchronized with its column content.
But I also want to let the possibility to the user to reduce this size manually.
I'd do something like :
treeView->setMaximumWidth( sum(columnContentWidth));
1/3