summaryrefslogtreecommitdiffstats
path: root/examples/mainwindows
diff options
context:
space:
mode:
Diffstat (limited to 'examples/mainwindows')
-rw-r--r--examples/mainwindows/dockwidgets/dockwidgets.pro3
-rw-r--r--examples/mainwindows/dockwidgets/mainwindow.cpp3
2 files changed, 5 insertions, 1 deletions
diff --git a/examples/mainwindows/dockwidgets/dockwidgets.pro b/examples/mainwindows/dockwidgets/dockwidgets.pro
index 42eab88010..7e0da2496e 100644
--- a/examples/mainwindows/dockwidgets/dockwidgets.pro
+++ b/examples/mainwindows/dockwidgets/dockwidgets.pro
@@ -9,6 +9,7 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES dockwidgets.pro images
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/mainwindows/dockwidgets
INSTALLS += target sources
-QT += widgets printsupport
+QT += widgets
+!isEmpty(QT.printsupport.name): QT += printsupport
simulator: warning(This example might not fully work on Simulator platform)
diff --git a/examples/mainwindows/dockwidgets/mainwindow.cpp b/examples/mainwindows/dockwidgets/mainwindow.cpp
index 9f1a09c7d5..da01d56502 100644
--- a/examples/mainwindows/dockwidgets/mainwindow.cpp
+++ b/examples/mainwindows/dockwidgets/mainwindow.cpp
@@ -40,7 +40,10 @@
//! [0]
#include <QtWidgets>
+#ifndef QT_NO_PRINTDIALOG
#include <QtPrintSupport>
+#endif
+
#include "mainwindow.h"
//! [0]