5#include <QtPrintSupport/qtprintsupportglobal.h>
6#if QT_CONFIG(printdialog)
10int main(
int argc,
char **argv)
20 qWarning(
"failed to open file, is it writable?");
25 qWarning(
"failed in flushing page to disk, disk full?");
The QApplication class manages the GUI application's control flow and main settings.
The QPainter class performs low-level painting on widgets and other paint devices.
bool begin(QPaintDevice *)
Begins painting the paint device and returns true if successful; otherwise returns false.
void drawText(const QPointF &p, const QString &s)
Draws the given text with the currently defined text direction, beginning at the given position.
bool newPage() override
Tells the printer to eject the current page and to continue printing on a new page.
void setOutputFormat(OutputFormat format)
void setOutputFileName(const QString &)
Sets the name of the output file to fileName.
QApplication app(argc, argv)
[0]