summaryrefslogtreecommitdiffstats
path: root/examples/widgets/widgets/windowflags/previewwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/widgets/windowflags/previewwindow.cpp')
-rw-r--r--examples/widgets/widgets/windowflags/previewwindow.cpp21
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";