diff --git a/support/configdialog.cpp b/support/configdialog.cpp index cdb49c57a..96fafd5a6 100644 --- a/support/configdialog.cpp +++ b/support/configdialog.cpp @@ -213,6 +213,10 @@ bool ConfigDialog::setCurrentPage(const QString &id) setCaption(it.value().item->text()); it.value().item->setChecked(true); } + if (isVisible()) { + it.value().widget->ensurePolished(); + ensurePolished(); + } int newH=it.value().widget->sizeHint().height()+toolBar->height()+buttonBox->height()+layout()->spacing()+(2*layout()->margin()); if (isVisible()) { if (newH!=height()) { @@ -226,6 +230,8 @@ bool ConfigDialog::setCurrentPage(const QString &id) } } else { setFixedHeight(newH); + resize(width(), newH); + setMaximumHeight(QWIDGETSIZE_MAX); } #else pageWidget->setCurrentPage(pages[id]); @@ -233,6 +239,18 @@ bool ConfigDialog::setCurrentPage(const QString &id) return true; } +#ifdef __APPLE__ +void ConfigDialog::setH(int h) +{ + if (h==resizeAnim->endValue().toInt()) { + setMaximumHeight(QWIDGETSIZE_MAX); + resize(width(), h); + } else { + setFixedHeight(h); + } +} +#endif + QWidget * ConfigDialog::getPage(const QString &id) const { if (!pages.contains(id)) { diff --git a/support/configdialog.h b/support/configdialog.h index acf815867..7e17e7ad6 100644 --- a/support/configdialog.h +++ b/support/configdialog.h @@ -68,7 +68,7 @@ public: void accept(); void reject(); int getH() const { return height(); } - void setH(int h) { setFixedHeight(h); } + void setH(int h); #endif virtual void save()=0;