[Qt-interest] Please help me understand resizing...

Sven Grunewaldt strayer at olle-orks.org
Thu Jul 23 21:31:05 CEST 2009


Hi,

I don't really know how to explain my problem, so I will describe what I 
want to do and attach a testcase which shows what I'm doing (and 
hopefully tells you what I'm doing wrong...)

I have a QMainWindow with a QPushButton and a QPlainTextEdit inside a 
QVBoxLayout. When I click on the button, the QPlainTextEdit is hidden 
and I call resize(sizeHint()); to remove the unneeded space in the 
Layout. Sadly, this doesn't work. It seems like resize(...) is doing 
nothing at all.
After clicking the button, it looks like this:
http://www.abload.de/img/resize18brt.jpg

But it should look like this:
http://www.abload.de/img/resize2dbi0.jpg

Maybe someone could look into the attached code and give me a hint what 
I should do.

Regards,
Sven Grunewaldt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resize testcase.zip
Type: application/octet-stream
Size: 1163 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090723/32ef99f9/attachment.obj 


More information about the Qt-interest-old mailing list