John Levon wrote: > On Mon, Aug 04, 2003 at 02:51:47PM +0100, Angus Leeming wrote: > >> I guess that that means that the 'fix' is not to resize the left >> hand pane? > > It's fixed size. > >> Why don't you make use of that draggable widget thingy that I >> see in many kde apps? (knode, kmail, konqueror...) Is it KDE, >> rather than a Qt, feature? > > Nope, QSplitter. It might work indeed. But far better would be to > work out the width of the LHS and make it fit. But my attempts have > failed.
Now, I know less than nothing about Qt and, looking at the Qt docs, I can't see how you can loop over all widgets of a QWidgetStack. However, assuming that such a function is called size(), why would this not work? int max_width = 0; QWidgetStack * tree = dialog_->moduleStack; for (int i = 0; i < tree.size(); ++i) { QWidget * widget = tree.widget(id); max_width = std::max(max_width, widget->width()); } tree->setFixedWidth(max_width); -- Angus