File: cfgtest_QtPrintSupport.cpp

package info (click to toggle)
pyqt6 6.10.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,740 kB
  • sloc: cpp: 18,294; python: 10,614; javascript: 721; makefile: 25; sh: 10
file content (41 lines) | stat: -rw-r--r-- 752 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <QCoreApplication>
#include <QFile>
#include <QLibraryInfo>
#include <QTextStream>

#include <qprinter.h>


int main(int argc, char **argv)
{
    QCoreApplication app(argc, argv);
    QFile outf(argv[1]);

    if (!outf.open(QIODevice::WriteOnly|QIODevice::Truncate|QIODevice::Text))
        return 1;

    QTextStream out(&outf);

    // The link test.
    new QPrinter();

    // Determine which features should be disabled.

#if defined(QT_NO_PRINTER)
    out << "PyQt_Printer\n";
#endif

#if !QT_CONFIG(printdialog)
    out << "PyQt_PrintDialog\n";
#endif

#if !QT_CONFIG(printpreviewdialog)
    out << "PyQt_PrintPreviewDialog\n";
#endif

#if !QT_CONFIG(printpreviewwidget)
    out << "PyQt_PrintPreviewWidget\n";
#endif

    return 0;
}