[Qt-interest] tab widget children geometry management

Giacomo giacomo.strangolino at elettra.trieste.it
Mon Oct 19 14:06:03 CEST 2009


Hi to all.

I am adding QWidgets to a QTabWidget, then I want to save the geometry of each 
QWidget inside the QTabWidget, via an Xml file.

What I cannot understand is how to do with the QTabWidgets.

I am not able to place again correctly the child widgets when I load them.

For each new child I call setGeometry(), after adding the child as child of 
QTabWidget.

pb->setGeometry(QRect(10,10,25,15);

If the push button is placed in a hidden tab, then when I switch to that tab I 
am not able to find it.

I observed that when switching tabs, the resize event that is received by the 
container QWidget of the QTabWidget has QSize(-1,1) as old size.

I would like to know how I can correctly place child widgets into a 
QTabWidget.

Thanks in advance for any hint.

Giacomo.



More information about the Qt-interest-old mailing list