[Qt-interest] setSizePolicy has no effect in subclass of QDialog

Farid Derradji farid.derradji at ITWM.fraunhofer.de
Tue Jun 2 14:09:22 CEST 2009


As far as I have understood, the following configurations apply:
 * An instance of QDialog (or of a derived subclass) has been
   modified with a different size policy
 * the same instance has an internal layout.

If this is correct, then both settings are completely independent of
each other. This is so, because the size policy is only important for
any layout in which the dialog itself is arranged.

Hence it never affects any internal layout.

If you want to customize your dialog to the smallest possible size, you
should try QLayout::minimumSize ().

Regards
Farid



More information about the Qt-interest-old mailing list