[solved] QWebView not printing text (images ok)
I have a simple html file viewer and wanted to add a print button.
QPrintDialog dialog(&printer, this); if (dialog.exec()) dynamic_cast<QWebView*>( mdiArea->currentSubWindow()->widget() )->print(&printer);
Unfortunately it output correctly images, but not the text.
What could I be doing wrong? I googled the subject, found some thread with the same problem, but no answers.
It's a known bug for at least 4.7.2 and 4.7.3:
"QtWebKit bug #61271":https://bugs.webkit.org/show_bug.cgi?id=61271 and "QTBUG-17987":https://bugreports.qt.nokia.com/browse/QTBUG-17987
I don't know the status for 4.7.4 as that has another regression that blocks it for us.
It seems as it's fixed in 4.7.4.
Issue "QTBUG-19571":https://bugreports.qt.nokia.com/browse/QTBUG-19571 contains a "patch":https://bugreports.qt.nokia.com/secure/attachment/25141/patch.diff that fixes the bug.
Another related issue is "QTBUG-19525":https://bugreports.qt.nokia.com/browse/QTBUG-19525
I recompiled Qt 4.7.4 yesterday, and I now works perfectly!
Thanks for the update Volker.
You're welcome. The bug is really annoying, we have to ship a patch to our customers as they are not able to print from windows with the vanilla 4.7.3 Qt libs.
I am experiencing the same problem in versions > 5 Qt 5.0.2 and Qt 5.1.1. Is this a bug?
But when I use ready-to made Qt5.1.1 installer containing qt 5.1.1 libraries and QtCreator, which is also 5.1 it does not cause any problems?
I can't switch to 4.x version, because I need CSS pagination support, which is there in 5, but not in 4
Blocked on this for 2 days now? Somebody help please?