[Qt-interest] How to make a top level window unresizable?
Dong Tiger
idlecat511 at gmail.com
Wed Feb 18 07:50:54 CET 2009
Thanks all. J-P's method fits me best.
2009/2/18 J-P Nurmi <jpnurmi at gmail.com>
> On Wed, Feb 18, 2009 at 7:59 AM, Dong Tiger <idlecat511 at gmail.com> wrote:
>
>> Hi,
>>
>> I am trying to make a Qt top level window unresizable, that is, user can't
>> drag the border to change the window's size.
>>
>>
> Hi,
>
> If the window has a proper top level layout installed, you can simply set
>
> window->layout()->setSizeConstraint(QLayout::SetFixedSize);
>
> and it will automatically adjust to the size hint of the contents. This is
> a bit more dynamic approach than using
>
> window->setFixedSize(window->sizeHint());
>
> --
> J-P Nurmi
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090218/5144dea6/attachment.html
More information about the Qt-interest-old
mailing list