diff options
Diffstat (limited to 'src/plugins/qtsupport/qtoptionspage.cpp')
-rw-r--r-- | src/plugins/qtsupport/qtoptionspage.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/plugins/qtsupport/qtoptionspage.cpp b/src/plugins/qtsupport/qtoptionspage.cpp index 92b439ea1a..fba6b8154f 100644 --- a/src/plugins/qtsupport/qtoptionspage.cpp +++ b/src/plugins/qtsupport/qtoptionspage.cpp @@ -969,20 +969,13 @@ void QtOptionsPageWidget::linkWithQt() bool askForRestart = false; QDialog dialog(Core::ICore::dialogParent()); dialog.setWindowTitle(title); - auto layout = new QVBoxLayout; - dialog.setLayout(layout); auto tipLabel = new QLabel(linkingPurposeText()); tipLabel->setWordWrap(true); - layout->addWidget(tipLabel); - auto pathLayout = new QHBoxLayout; - layout->addLayout(pathLayout); auto pathLabel = new QLabel(Tr::tr("Qt installation path:")); pathLabel->setToolTip( Tr::tr("Choose the Qt installation directory, or a directory that contains \"%1\".") .arg(settingsFile(""))); - pathLayout->addWidget(pathLabel); auto pathInput = new PathChooser; - pathLayout->addWidget(pathInput); pathInput->setExpectedKind(PathChooser::ExistingDirectory); pathInput->setBaseDirectory(FilePath::fromString(QCoreApplication::applicationDirPath())); pathInput->setPromptDialogTitle(title); @@ -997,8 +990,17 @@ void QtOptionsPageWidget::linkWithQt() pathInput->setFilePath(currentLink ? *currentLink : defaultQtInstallationPath()); pathInput->setAllowPathFromDevice(true); auto buttons = new QDialogButtonBox; - layout->addStretch(10); - layout->addWidget(buttons); + + using namespace Layouting; + Column { + tipLabel, + Form { + Tr::tr("Qt installation path:"), pathInput, br, + }, + st, + buttons, + }.attachTo(&dialog); + auto linkButton = buttons->addButton(Tr::tr("Link with Qt"), QDialogButtonBox::AcceptRole); connect(linkButton, &QPushButton::clicked, &dialog, &QDialog::accept); auto cancelButton = buttons->addButton(Tr::tr("Cancel"), QDialogButtonBox::RejectRole); @@ -1022,6 +1024,7 @@ void QtOptionsPageWidget::linkWithQt() connect(pathInput, &PathChooser::validChanged, linkButton, &QPushButton::setEnabled); linkButton->setEnabled(pathInput->isValid()); + dialog.setMinimumWidth(520); dialog.exec(); if (dialog.result() == QDialog::Accepted) { const std::optional<FilePath> settingsDir = settingsDirForQtDir(pathInput->baseDirectory(), |