Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
5.1.0 Beta 1, 5.1.0 RC1
-
None
-
Tested on Mac OS X 10.8.4 (iMac8,1)
Description
The printing seems to be totally broken on Mac OS X when printing to native printer. Here is a simple example:
QTextDocument *d = new QTextDocument(); QTextCursor cursor = QTextCursor(d); cursor.insertText("TEST"); QPrinter *printer = new QPrinter(QPrinter::HighResolution); printer->setOutputFormat(QPrinter::NativeFormat); QPrintDialog printDialog(printer, this); printDialog.setOption(QAbstractPrintDialog::PrintShowPageSize,true); if (printDialog.exec() == QDialog::Accepted) { d->print(printer); }
This shows print dialog, but nothing prints when dialog is accepted. Instead it gives the following message to application output dialog:
QPainter::begin(): Returned false
There is no problem when using Qt 4.8.4 on Mac.
This works on Windows with Qt 5.1. It works also on Mac OS X with Qt 5.1 when printing to pdf file (setOutputFormat is PdfFormat).