[Qt-interest] Uncloseable QMdiSubWindow?

Rui Maciel rui.maciel at gmail.com
Tue May 11 02:37:12 CEST 2010


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



More information about the Qt-interest-old mailing list