[Qt-interest] QTabWidget resize events on hidden tabs
Giacomo
giacomo.strangolino at elettra.trieste.it
Tue Oct 20 10:59:51 CEST 2009
Hi.
Can someone explain how QResizeEvents are delivered to hidden widgets of a
QTabWidget.
I need to place QWidgets on the tabs of a QTabWidget, and to proportionally
resize them when the QTabWidget is resized.
I do like this:
QTabWidget *tabW = new QTabWidget;
QWidget *tab1 = new QWidget(0);
QWidget *tab2 = new QWidget(0);
tabW->addTab(tab1);
tabW->addTab(tab2);
QLabel *l1 = new QLabel(tab1);
QLabel *l2 = new QLabel(tab2);
When I resize QTabWidget, I want to resize proportionally labels l2 and l1.
But if tab1 is visible, then it seems that resize events on tab2 have an
invalid oldSize().
How can I do to cleanly resize widgets children of hidden tabs?
Thanks in advance.
Giacomo
Elettra Synchrotron Radiation Facility
Trieste - Italy
http://www.elettra.trieste.it
More information about the Qt-interest-old
mailing list