summaryrefslogtreecommitdiffstats
path: root/examples/widgets/graphicsview
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-06-07 12:05:33 +0200
committerLiang Qi <liang.qi@qt.io>2017-06-07 14:02:43 +0200
commit7cbee5629604aa49c618829c8e3e55fc64e94df7 (patch)
treed12041105160c1cb21226b365edb9653d87b5853 /examples/widgets/graphicsview
parente400b7e326c554ccd819448866265953d2a0f24d (diff)
parent5f0ce2333f7e11a3ffb5d16a27cd9303efa712d5 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/widgets/widgets/qmenu.cpp Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
Diffstat (limited to 'examples/widgets/graphicsview')
-rw-r--r--examples/widgets/graphicsview/chip/view.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/widgets/graphicsview/chip/view.cpp b/examples/widgets/graphicsview/chip/view.cpp
index 62aa25b575..79b173bec7 100644
--- a/examples/widgets/graphicsview/chip/view.cpp
+++ b/examples/widgets/graphicsview/chip/view.cpp
@@ -50,8 +50,13 @@
#include "view.h"
+#if defined(QT_PRINTSUPPORT_LIB)
+#include <QtPrintSupport/qtprintsupportglobal.h>
+#if QT_CONFIG(printdialog)
#include <QPrinter>
#include <QPrintDialog>
+#endif
+#endif
#ifndef QT_NO_OPENGL
#include <QtOpenGL>
#else
@@ -259,7 +264,7 @@ void View::toggleAntialiasing()
void View::print()
{
-#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
+#if QT_CONFIG(printdialog)
QPrinter printer;
QPrintDialog dialog(&printer, this);
if (dialog.exec() == QDialog::Accepted) {