View Full Version : How to stretch widgets to fill the layout size

20th April 2012, 06:33
I have a QHBoxLayout in which there are two elements. First element is QTableWidget and second is QVBoxLayout. I didn't set any spaces to the layouts or the widgets inside the layouts.
I want the QTableWidget and QVBox layout to share the spaces automatically without giving size constraints to it. Can it be done ?

20th April 2012, 06:43
QHBoxLayout::addWidget( QTableWidget, 1 );
QHBoxLayout::addLayout( QVBoxLayout, 1 );