Bug in Qt5.2.1:
The only problem was corrected in QPrintPreviewDialog
but when the print is printed on paper the failure still exists.
With QPrintPreviewDialog
pages work perfect, but on "paper" (printed in paper) from second page (in other words all pages except the first occur the BUG) "texts" and "images" (non-background) disappear (apparently the fault only occurs with inline elements).
See: https://bugreports.qt.io/browse/QTBUG-37240 (see the attachments to a test-case)
Bug in Qt5.0.1, Qt5.0.2 and Qt5.1.0
The first page of the print out of a QWebView with small fonts and images.
Apparently the problem only occurs with inline elements (texts and images).
Note: The error occurs in Windows XP, Windows 7, Window 7 x64, Mac OS X 10.8.3
[edit]
Source-html: http://jsfiddle.net/bdm6Y/2/
Frame content: http://jsfiddle.net/bdm6Y/2/show/
Source:
QPrinter p;
p.setPaperSize(QPrinter::A4);
p.setFullPage(true);
p.setResolution(300);
p.setOrientation(QPrinter::Portrait);
QPrintPreviewDialog preview(&p);
preview.setWindowTitle(ui->myWebView->page()->mainFrame()->title());
connect(&preview, SIGNAL(paintRequested(QPrinter*)), this, SLOT(printPreview(QPrinter*)));
preview.exec();
...
void printPreview(QPrinter *printer) {
ui->myWebView->print(printer);
}
I do not know if this is a bug or something I did wrong, what could it be?
Thanks!
[edit]
QT bug reports:
QTBUG-30621
is closed with resolution Done in Qt 5.2.0 Alpha. Does that bugfix solve your issue? – Dustproof