[Qt-interest] Fwd: How to make a top level window unresizable?
chandrasekar wagmare
sekarwagmare at gmail.com
Wed Feb 18 07:10:38 CET 2009
---------- Forwarded message ----------
From: chandrasekar wagmare <sekarwagmare at gmail.com>
Date: Wed, Feb 18, 2009 at 11:40 AM
Subject: Re: [Qt-interest] How to make a top level window unresizable?
To: Ankit Agarwal <ankit17.ag at gmail.com>
if your mainwindow is toplevel then
mainwindow->setGeometry(QRect(0, 0, 585, 570));
mainwindow->setMinimumSize(QSize(585, 570));
mainwindow->setMaximumSize(QSize(585, 570));
so user cant resize ..
On Wed, Feb 18, 2009 at 11:32 AM, Ankit Agarwal <ankit17.ag at gmail.com>wrote:
> Hi,
> I think that this can be achived by setting the sizePolicy and making the
> minSize and maxSize of the window same.
>
> On Wed, Feb 18, 2009 at 11:29 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.
>>
>> I didn't find any api in Qt4 for this. So I need to call XChangeProperty
>> to remove "_NET_WM_ACTION_RESIZE" from property "_NET_WM_ALLOWED_ACTIONS"
>> directly.
>>
>> It sounds simple. But I found this property is modified after the window
>> is shown (Within showEvent, it's empty.)
>>
>> So I doubt this is a right approach. Any suggestion?
>>
>> --
>> Tiger
>>
>>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>
>
> --
> Regards,
> Ankit Agarwal
> SW Engineer
> Vegayan Systems
> email : ankit_agarwal at vegayan.com
> Blog : http://ankit17.wordpress.com
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
--
CHANDRU
--
CHANDRU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090218/ee8595e9/attachment.html
More information about the Qt-interest-old
mailing list