forked from qt-creator/qt-creator
CMakePM: Add "Close" button for Kit Configuration dialog
This looks more in sync with other dialogs that we display. Change-Id: I445da900982b7bdcc12d810e69170b0a7695b30c Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -639,6 +639,7 @@ void CMakeBuildSettingsWidget::kitCMakeConfiguration()
|
|||||||
dialog->setWindowTitle(tr("Kit CMake Configuration"));
|
dialog->setWindowTitle(tr("Kit CMake Configuration"));
|
||||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
dialog->setModal(true);
|
dialog->setModal(true);
|
||||||
|
dialog->setSizeGripEnabled(true);
|
||||||
connect(dialog, &QDialog::finished, this, [=]{
|
connect(dialog, &QDialog::finished, this, [=]{
|
||||||
m_buildConfiguration->kit()->unblockNotification();
|
m_buildConfiguration->kit()->unblockNotification();
|
||||||
});
|
});
|
||||||
@@ -658,6 +659,12 @@ void CMakeBuildSettingsWidget::kitCMakeConfiguration()
|
|||||||
|
|
||||||
layout->setColumnStretch(1, 1);
|
layout->setColumnStretch(1, 1);
|
||||||
|
|
||||||
|
auto buttons = new QDialogButtonBox(QDialogButtonBox::Close);
|
||||||
|
connect(buttons, &QDialogButtonBox::clicked, dialog, &QDialog::close);
|
||||||
|
layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Maximum, QSizePolicy::MinimumExpanding),
|
||||||
|
4, 0);
|
||||||
|
layout->addWidget(buttons, 5, 0, 1, -1);
|
||||||
|
|
||||||
dialog->setMinimumWidth(400);
|
dialog->setMinimumWidth(400);
|
||||||
dialog->resize(800, 1);
|
dialog->resize(800, 1);
|
||||||
dialog->show();
|
dialog->show();
|
||||||
|
|||||||
Reference in New Issue
Block a user