正确做法:
optionGroup->hide();
QEventLoop loop;
QTimer::singleShot(10, &loop, SLOT(quit()));
loop.exec();
//延时让系统反应获取最小大小,不延时则获取的最小大小和之前一样
this->resize(this->width(), this->minimumHeight());