[Qt-interest] Resizing a QMDiSubWindow.
Bjoern Erik Nilsen
bnilsen at trolltech.com
Thu Mar 12 17:16:52 CET 2009
Hi,
wim.delvaux at adaptiveplanet.com wrote:
> The SubWindow contains some widget.
>
> I want to resize the SubWindow to 'fit' the widget's size.
>
> I do
>
> SubWindow->widget()->resize( SubWindow->widget()->sizeHint() );
> SubWindow->updateGeometry()
>
> Unfortunately that does not resize the MDISubwindow. However If i resize it
> is 'snaps' to a certain size. (possible the sizeHint() size).
>
> How can I resize subwindows programmatically ?
You simply resize it; SubWindow->resize(). Note that
SubWindow->widget()->resize() resizes the widget inside the sub-window
and not the sub-window itself.
Hope this helps,
--
Bjørn Erik Nilsen
Software Engineer
Nokia, Qt Software
More information about the Qt-interest-old
mailing list