[Qt-interest] Uncloseable QMdiSubWindow?
Malyushytsky, Alex
alex at wai.com
Tue May 11 03:20:46 CEST 2010
Try to set the flags when you call mdiArea->addSubWindow as in my example below.
Alex
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Rui Maciel
Sent: Monday, May 10, 2010 5:37 PM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Uncloseable QMdiSubWindow?
Malyushytsky, Alex wrote:
>>> Is there a way to configure a QMdiSubWindow to make it impossible to be
>>> closed by the user?
>
> It seems natural do nott provide user an access to the controls which
> allows to do close/hide widget.
>
> You could just not show window close button right? From Qt documentation:
> "The CustomizeWindowHint flag is used to enable customization of the
> window controls. This flag must be set to allow the WindowTitleHint,
> WindowSystemMenuHint, WindowMinimizeButtonHint, WindowMaximizeButtonHint
> and WindowCloseButtonHint flags to be changed."
>
> Hope this helps,
> Alex
I've followed your suggestion but I haven't had much luck. I've added a MDI window through the
following command:
window_gl_viewport = new QMdiSubWindow(mdiArea, Qt::CustomizeWindowHint |Qt::WindowTitleHint|
Qt::WindowMinMaxButtonsHint );
And the close button is still displayed in the window and it still works.
Anyway, thanks for the help
Rui Maciel
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
“This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”
“Please consider our environment before printing this email.”
More information about the Qt-interest-old
mailing list