hello,
I have a dialog box with a list 3 QCheckBoxes items inside it. The visibility of last two items is connected to first QCheckbox.
So, when the checkbox is 'on', the two items are visible and 'off' makes them invisible.
By default, they are set invisible. So, when turn first checkbox 'on', the items appear and the height of dialog box is increased. So far fine.
But when I turn it 'off', the items disappear leaving empty space in the layout (since the dialog box is now larger).
How can I make the window height also resize (get shorter) when items are invisible?
For example:
Since I use a QVBoxLayout as the main layout in my dialog box:
QVBoxLayout *MainLayout = new QVBoxLayout;
MainLayout->addItem( new QSpacerItem(1,1,QSizePolicy::Expanding, QSizePolicy::Expanding));
To copy to clipboard, switch view to plain text mode
Like the above lines resize the layout, how can I similarly resize the dialog-box height? Please help.
Bookmarks