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

chandrasekar wagmare sekarwagmare at gmail.com
Tue Feb 24 06:52:20 CET 2009


but how can i use it in QGraphicsView() where there is no layout();

On Wed, Feb 18, 2009 at 11:43 AM, J-P Nurmi <jpnurmi at gmail.com> wrote:

> 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
>
>


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


More information about the Qt-interest-old mailing list