ya, the slot function is in the dialog class.
I actually have 2 sub-layouts which added to the MainLayout. When the checkbox items are set visible, then the items are added vertically in the sub-layout, resulting in increase in the height of sub-layouts, mainlayout and hence the dialog box. Now, when the visibility is turned off, I can shrink back the layout to original size using:
MainLayout->addItem( new QSpacerItem(1,1,QSizePolicy::Expanding, QSizePolicy::Expanding)); //to shrink the layout
To copy to clipboard, switch view to plain text mode
But the height of the dialog box remains same (larger than original).
What I want to have is when the items are invisible, the whole dialog box height should also reduce to the original height. In other words, currently the height only increases(when visibility 'on') but not decreases back (when visibility 'off').
How can I make it work in both directions?
Bookmarks