[Qt-interest] Non-resizable dialog windows

Enrique Cuesta enriquecues at gmail.com
Thu Feb 25 23:38:02 CET 2010


there are many options...
some examples:

1)

   this->setWindowFlags(Qt::Dialog
                        | Qt::MSWindowsFixedSizeDialogHint
                        | Qt::CustomizeWindowHint | Qt::WindowTitleHint);

2)

this->adjustSize();
this->setMinimumSize(this->size());
this->setMaximumSize(this->size());

3)
put your main layout FIXED
and size policy of your layout FIXED too

2010/2/25 KC Jones <kc at asperasoft.com>:
> I have a dialog, a modeless preference dialog, that is not resizable
> by the user.
> But it can resize itself when different tabs are selected by the user.
>
> How can I eliminate the size grips on the window frame?
> And if it is not possible to eliminate it, how can I prevent the user
> from actually resizing the dialog window?
>
> I have tried calling QDialog::setSizeGripEnabled(false) but that does not work.
> I've fiddled with setting the size policy to fixed in both height and
> width.  No luck.
>
>
> I'm building against Qt4.5.2 on Mac OSX 10.5
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>




More information about the Qt-interest-old mailing list