I am using QT 4.5.0.
I am using a QWidget with 10 checkboxes. 5 of these checkboxes need to be show/hide dynamically depending on certain conditions.
When i hide those 5 check boxes the QWidget is not getting self adjusted.
I checked the sizeHint(), which is not getting self adjusted.
In my case the widget is adjusting the visible 5 checkbox into the area which is used for showing the 10 checkboxs.
What all may be the possible reasons which prevent the proper resizing of the QWidget ?
Here is a sample code which i tried within a button click SLOT.
QSize prefSize = QDialog::sizeHint();
wholeWordsCheckBox->setVisible(false);
backwardCheckBox->setVisible(false);
searchSelectionCheckBox->setVisible(false);
prefSize = QDialog::sizeHint();
here the sizeHint() is working when the checkboxes are set as visible, but NOT working when the checkboxes are set as hidden.
Bookmarks