diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index d553cfba7..734fc1a53 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -393,15 +393,18 @@ void CMakeSetupDialog::doHelp() "directory."); QDialog dialog; + QFontMetrics met(this->font()); + int msgWidth = met.width(msg); + dialog.setMinimumSize(msgWidth/15,20); dialog.setWindowTitle(tr("Help")); QVBoxLayout* l = new QVBoxLayout(&dialog); QLabel* lab = new QLabel(&dialog); - l->addWidget(lab); lab->setText(msg); lab->setWordWrap(true); QDialogButtonBox* btns = new QDialogButtonBox(QDialogButtonBox::Ok, Qt::Horizontal, &dialog); QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept())); + l->addWidget(lab); l->addWidget(btns); dialog.exec(); }