[Qt-interest] How to make a top level window unresizable?

chandrasekar wagmare sekarwagmare at gmail.com
Wed Feb 18 07:55:44 CET 2009


yeh jpn  suggestion is correct ... thanks to him ..
On Wed, Feb 18, 2009 at 12:20 PM, Dong Tiger <idlecat511 at gmail.com> wrote:

> 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
>>
>>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>


-- 
CHANDRU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090218/bda6fcd6/attachment.html 


More information about the Qt-interest-old mailing list