[Qt-interest] Problem with Layout, it does not resize itself
Maximilien Renard
iixamaxii at gmail.com
Wed Feb 17 13:14:12 CET 2010
Dear Qt Users,
I'm having some trouble using layouts.
Basically, this is what I have in a widget which is in a QScrollArea which
is set as the centralWidget of my MainApplication :
Widget::Widget() : QWidget() {
QVBoxLayout * vBoxLayout = new QVBoxLayout;
QLabel * label = new QLabel("LABEL");
vBoxLayout->addWidget(label);
QFormLayout * formLayout = new QFormLayout;
formLayout->addRow("LOL", new QLineEdit());
formLayout->addRow("WAT", new QLineEdit());
formLayout->addRow("WOW", new QLineEdit());
vBoxLayout->addLayout(formLayout);
setLayout(vBoxLayout);
}
And this is (not the example but the code isn't that much different) what I
get when I resize the QMainWindow. On the screenshot you can also see what
is happening when I add a widget into either one of both layouts (existings
widgets become smaller since the layout is not resized).
http://www.ixamaxi.be/images/problem-layout.png
Could someone explain me what is happening ?
Thank you very much.
Best regards
Maximilien Renard
ULB - MA1 Ingénieur Civil Biomédical
maximilien.renard at ulb.ac.be
+32 476 63 68 92
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100217/4a02ba1a/attachment.html
More information about the Qt-interest-old
mailing list