diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2008-03-28 16:53:31 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2008-03-28 16:53:31 (GMT) |
commit | 369379f0c6fa6622d67722f7dd9c15d482ef2602 (patch) | |
tree | 23b94470e7580274ce57801a64dd6e3307a8a403 /Source | |
parent | 79e581ab802381545fa7fe22d54710200fbe0951 (diff) | |
download | CMake-369379f0c6fa6622d67722f7dd9c15d482ef2602.zip CMake-369379f0c6fa6622d67722f7dd9c15d482ef2602.tar.gz CMake-369379f0c6fa6622d67722f7dd9c15d482ef2602.tar.bz2 |
ENH: Better default size for help dialog.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index d553cfb..734fc1a 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(); } |