[Qt-interest] Please help me understand resizing...
Sven Grunewaldt
strayer at olle-orks.org
Fri Jul 24 11:30:19 CEST 2009
Hi,
thanks for the link! When I change the testcase from QMainWindow to
QDialog and set the sizeConstraint of the Layout to SetFixedSize, it
works as expected.
This has two major problems though:
1. It only works with QDialog and NOT with QMainWindow (I guess it has
something to do with the centralWidget)
2. SetFixedSize enforces a specific size, so the user can't resize the
window, which is not what I want.
Regards,
Sven Grunewaldt
Am 24.07.2009 00:21, schrieb Diego Schulz:
> On Thu, Jul 23, 2009 at 3:31 PM, Sven Grunewaldt<strayer at olle-orks.org> wrote:
>
>> 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.
>>
> There's a nice example in the docs that [I hope] you might find useful.
> http://doc.trolltech.com/4.5/dialogs-extension.html
>
> regards,
>
> diego
>
>
>> Regards,
>> Sven Grunewaldt
>>
> _______________________________________________
> 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