diff options
Diffstat (limited to 'examples/widgets/mainwindows/dockwidgets/mainwindow.cpp')
-rw-r--r-- | examples/widgets/mainwindows/dockwidgets/mainwindow.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/widgets/mainwindows/dockwidgets/mainwindow.cpp b/examples/widgets/mainwindows/dockwidgets/mainwindow.cpp index eb5864c818..47a6e78265 100644 --- a/examples/widgets/mainwindows/dockwidgets/mainwindow.cpp +++ b/examples/widgets/mainwindows/dockwidgets/mainwindow.cpp @@ -50,9 +50,12 @@ //! [0] #include <QtWidgets> -#ifndef QT_NO_PRINTDIALOG +#if defined(QT_PRINTSUPPORT_LIB) +#include <QtPrintSupport/qtprintsupportglobal.h> +#if QT_CONFIG(printdialog) #include <QtPrintSupport> #endif +#endif #include "mainwindow.h" //! [0] @@ -125,7 +128,7 @@ void MainWindow::newLetter() //! [3] void MainWindow::print() { -#ifndef QT_NO_PRINTDIALOG +#if QT_CONFIG(printdialog) QTextDocument *document = textEdit->document(); QPrinter printer; |