diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-19 21:54:52 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-19 21:54:53 +0200 |
commit | 15dc8b1d8e2db00dfcbe8d7f21150658f5de45b6 (patch) | |
tree | 6b9c908ca1cf0b1395fa91415f19b5adf8642ca7 /examples/widgets/widgets/windowflags/controllerwindow.cpp | |
parent | ecc83677006dc7dffcd2417b1e3cff88b0615756 (diff) | |
parent | 6234286925153279ca259cec04429fa584187b16 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I46ec05ade1c84e61f7f45562a218aa9ff55e2975
Diffstat (limited to 'examples/widgets/widgets/windowflags/controllerwindow.cpp')
-rw-r--r-- | examples/widgets/widgets/windowflags/controllerwindow.cpp | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/examples/widgets/widgets/windowflags/controllerwindow.cpp b/examples/widgets/widgets/windowflags/controllerwindow.cpp index e2abad89f4..0e9a916988 100644 --- a/examples/widgets/widgets/windowflags/controllerwindow.cpp +++ b/examples/widgets/widgets/windowflags/controllerwindow.cpp @@ -48,10 +48,15 @@ ** ****************************************************************************/ -#include <QtWidgets> - #include "controllerwindow.h" +#include <QCheckBox> +#include <QCoreApplication> +#include <QGroupBox> +#include <QHBoxLayout> +#include <QPushButton> +#include <QRadioButton> + //! [0] ControllerWindow::ControllerWindow(QWidget *parent) : QWidget(parent) @@ -63,7 +68,7 @@ ControllerWindow::ControllerWindow(QWidget *parent) quitButton = new QPushButton(tr("&Quit")); connect(quitButton, &QPushButton::clicked, - qApp, &QApplication::quit); + qApp, &QCoreApplication::quit); QHBoxLayout *bottomLayout = new QHBoxLayout; bottomLayout->addStretch(); @@ -83,26 +88,25 @@ ControllerWindow::ControllerWindow(QWidget *parent) //! [1] void ControllerWindow::updatePreview() { - Qt::WindowFlags flags = 0; + Qt::WindowFlags flags; - if (windowRadioButton->isChecked()) { + if (windowRadioButton->isChecked()) flags = Qt::Window; - } else if (dialogRadioButton->isChecked()) { + else if (dialogRadioButton->isChecked()) flags = Qt::Dialog; - } else if (sheetRadioButton->isChecked()) { + else if (sheetRadioButton->isChecked()) flags = Qt::Sheet; - } else if (drawerRadioButton->isChecked()) { + else if (drawerRadioButton->isChecked()) flags = Qt::Drawer; - } else if (popupRadioButton->isChecked()) { + else if (popupRadioButton->isChecked()) flags = Qt::Popup; - } else if (toolRadioButton->isChecked()) { + else if (toolRadioButton->isChecked()) flags = Qt::Tool; - } else if (toolTipRadioButton->isChecked()) { + else if (toolTipRadioButton->isChecked()) flags = Qt::ToolTip; - } else if (splashScreenRadioButton->isChecked()) { + else if (splashScreenRadioButton->isChecked()) flags = Qt::SplashScreen; //! [1] //! [2] - } //! [2] //! [3] if (msWindowsFixedSizeDialogCheckBox->isChecked()) |