PDA

View Full Version : Qidget height resize if child widgets invisible



visor_ua
27th April 2008, 09:42
Hello,

cant get good result for form height resizing , if hiding some elements
creating form in designer, it looks like:


vboxlayout1->addWidget( textbox1 );
vboxlayout1->addWidget( textbox2 );
vboxlayout1->addWidget( textbox3 );
groupBox->addLayout(vboxlayout);
hboxLayout->addWdiget( push_ok );
hboxLayout->addWdiget( push_cancel );
vboxlayout->addWidget( groupBox );
vboxlayout->addLayout(vboxlayout);
......
//in aplication settiing
textbox1->setVisible(false);
textbox1->setVisible(false);

form height is not changed, adjustsize not changing height also

wysota
27th April 2008, 12:27
Do you expect the top level window to reduce its size? If so, you need to set a size constraint on the layout using QLayout::setSizeConstraint(QLayout::SetFixedSize)