PDA

View Full Version : Strange resize behavior



Lykurg
8th January 2007, 22:06
Hi,

normally you only can resize a window with an QPushButton only that small, that at least the text is correctly shown. But in my Designer-created dialog, you can shirk the window even smaller. Why, and how to make, that it isn't allowed to sized so small?

Thanks,

Lykurg

e8johan
9th January 2007, 07:22
You can always try to play with the minimumSize property.

wysota
9th January 2007, 10:28
You can always try to play with the minimumSize property.

The problem is QPushButton has a minimumSizeHint of 40x25, so it should never shrink to 0 with sizePolicy set to Minimum or Fixed. This is really weird and I can't find a way to fix it. I have seen such things before but not in Qt4.

Lykurg
9th January 2007, 13:56
You can always try to play with the minimumSize property.

yes, with minimumSize I can handel this, but I want, that the user can decided which font size should be used, and for that minimumSize is not optimal...

But I just recognized, that this behavier could have to do with my QFrames. If I delete the QFrame on the bottom, and put the Buttons and the spacer in an Layout, than I can't shirk the Widget smaler than the buttons. I cant test it here in all ways, but I really guess that the problem must be in the two QFrames (top and bottem). I will have a look on it later that day.


Lykurg