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

Farid Derradji farid.derradji at ITWM.fraunhofer.de
Tue Jun 2 17:38:56 CEST 2009


Hello Stephen,

> OK, but surely you're not suggesting that I set the size policy separately
> for each widget inside the layout ?

Well, generally speaking, this is exactly what I mean. But don't be
worried, because all standard widgets like push buttons, entry fields
etc. have convenient default settings of their size policies. Hence in
practice you only have to focus on a small subset of sub controls.


> It seems to me that the height restriction should be
> done on either the outermost widget or the outermost layout
> somehow - then the inner widgets won't have to respond to
> inappropriate resize events.

It might be that this is a misunderstanding from me because I understood
that your dialog has to react on any size change of one of its sub
widgets. And in that case it would not be sufficient to restrict the
size of the topmost widget (Qt could be forced to clip its contents).

Regards
Farid



More information about the Qt-interest-old mailing list