summaryrefslogtreecommitdiffstats
path: root/examples/touch/fingerpaint/scribblearea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/touch/fingerpaint/scribblearea.cpp')
-rw-r--r--examples/touch/fingerpaint/scribblearea.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/touch/fingerpaint/scribblearea.cpp b/examples/touch/fingerpaint/scribblearea.cpp
index f8dadb4829..aa4e60c934 100644
--- a/examples/touch/fingerpaint/scribblearea.cpp
+++ b/examples/touch/fingerpaint/scribblearea.cpp
@@ -49,10 +49,13 @@
****************************************************************************/
#include <QtWidgets>
-#ifndef QT_NO_PRINTER
+#if defined(QT_PRINTSUPPORT_LIB)
+#include <QtPrintSupport/qtprintsupportglobal.h>
+#if QT_CONFIG(printdialog)
#include <QPrinter>
#include <QPrintDialog>
#endif
+#endif
#include "scribblearea.h"
@@ -167,7 +170,7 @@ void ScribbleArea::resizeImage(QImage *image, const QSize &newSize)
//! [21]
void ScribbleArea::print()
{
-#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG)
+#if QT_CONFIG(printdialog)
QPrinter printer(QPrinter::HighResolution);
QPrintDialog printDialog(&printer, this);
@@ -181,7 +184,7 @@ void ScribbleArea::print()
painter.setWindow(image.rect());
painter.drawImage(0, 0, image);
}
-#endif // QT_NO_PRINTER
+#endif // QT_CONFIG(printdialog)
}
//! [22]