Tondog
31st May 2010, 10:11
Hi togehter,
I've a QWidget which contained a QGroupBox.
The QGroupBox contained a vertical Layout.
Inside the QGroupBox, there's two other layouts. One is a QGridLayout.
I insert on runtime a QWidget into my QGridLayout. The problem is, that the size wouldn't re-adjust.
I want to have, that the layout will automatically set the size. Is that possible?
The code how I insert a QWidget into the QGridLayout:
QLineEdit* widget = new QLineEdit(this);
widget->setMinimumHeight(24);
widget->setMinimumWidth(50);
ui.gridLayout->addWidget(widget, cntRows, cntColumns, 1, 1);
Thanks for help
I've a QWidget which contained a QGroupBox.
The QGroupBox contained a vertical Layout.
Inside the QGroupBox, there's two other layouts. One is a QGridLayout.
I insert on runtime a QWidget into my QGridLayout. The problem is, that the size wouldn't re-adjust.
I want to have, that the layout will automatically set the size. Is that possible?
The code how I insert a QWidget into the QGridLayout:
QLineEdit* widget = new QLineEdit(this);
widget->setMinimumHeight(24);
widget->setMinimumWidth(50);
ui.gridLayout->addWidget(widget, cntRows, cntColumns, 1, 1);
Thanks for help