diff options
Diffstat (limited to 'examples/widgets/richtext/orderform/mainwindow.cpp')
-rw-r--r-- | examples/widgets/richtext/orderform/mainwindow.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/widgets/richtext/orderform/mainwindow.cpp b/examples/widgets/richtext/orderform/mainwindow.cpp index 35934bee72..030072978e 100644 --- a/examples/widgets/richtext/orderform/mainwindow.cpp +++ b/examples/widgets/richtext/orderform/mainwindow.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 "detailsdialog.h" #include "mainwindow.h" @@ -245,7 +248,7 @@ void MainWindow::openDialog() //! [17] void MainWindow::printFile() { -#if !defined(QT_NO_PRINTER) && !defined(QT_NO_PRINTDIALOG) +#if QT_CONFIG(printdialog) QTextEdit *editor = static_cast<QTextEdit*>(letters->currentWidget()); //! [18] QPrinter printer; |