PDA

View Full Version : Layout



^NyAw^
18th February 2008, 12:38
Hi,

I have one QWidget that has one QTableWidget and one QWidget(used for painting something). This QWidget is inserted to a QDockWidget. This QWidget has a QVBoxLayout to manage the QTableWidget and the second QWidget vertically.

The QTableWidget has 3 colums and the number of rows are variable.

What I want is that the QTableWidget occupies the minimum space and the widget occupies the maximum. This is because I have the QTableWidget as a statistic record and the QWidget draws a Pie chart.

Thanks,

yogeshm02
18th February 2008, 12:57
Have you tried adding the other QWidget to the layout using stretch factor of 1 i.e.

layout->addWidget(widget, 1);