diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-14 17:46:16 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-14 17:46:34 +0200 |
commit | 440286655e0ca271506cf7cc02ad0dbf4baef9ca (patch) | |
tree | 896fa81adb8b14a69355a3a6cf64d06ec8173c9a /examples/widgets/widgets/windowflags/previewwindow.cpp | |
parent | 1e27ad1697187549151657ba187928e439300db7 (diff) | |
parent | e164d61ca8263fc4b46fdd916e1ea77c7dd2b735 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
Diffstat (limited to 'examples/widgets/widgets/windowflags/previewwindow.cpp')
-rw-r--r-- | examples/widgets/widgets/windowflags/previewwindow.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/examples/widgets/widgets/windowflags/previewwindow.cpp b/examples/widgets/widgets/windowflags/previewwindow.cpp index 8773dccb05..d7ebed7b3c 100644 --- a/examples/widgets/widgets/windowflags/previewwindow.cpp +++ b/examples/widgets/widgets/windowflags/previewwindow.cpp @@ -50,7 +50,9 @@ #include "previewwindow.h" -#include <QtWidgets> +#include <QPushButton> +#include <QTextEdit> +#include <QVBoxLayout> //! [0] PreviewWindow::PreviewWindow(QWidget *parent) @@ -81,23 +83,22 @@ void PreviewWindow::setWindowFlags(Qt::WindowFlags flags) QString text; Qt::WindowFlags type = (flags & Qt::WindowType_Mask); - if (type == Qt::Window) { + if (type == Qt::Window) text = "Qt::Window"; - } else if (type == Qt::Dialog) { + else if (type == Qt::Dialog) text = "Qt::Dialog"; - } else if (type == Qt::Sheet) { + else if (type == Qt::Sheet) text = "Qt::Sheet"; - } else if (type == Qt::Drawer) { + else if (type == Qt::Drawer) text = "Qt::Drawer"; - } else if (type == Qt::Popup) { + else if (type == Qt::Popup) text = "Qt::Popup"; - } else if (type == Qt::Tool) { + else if (type == Qt::Tool) text = "Qt::Tool"; - } else if (type == Qt::ToolTip) { + else if (type == Qt::ToolTip) text = "Qt::ToolTip"; - } else if (type == Qt::SplashScreen) { + else if (type == Qt::SplashScreen) text = "Qt::SplashScreen"; - } if (flags & Qt::MSWindowsFixedSizeDialogHint) text += "\n| Qt::MSWindowsFixedSizeDialogHint"; |