Bug 61271
| Summary: | [Qt] [Regression] printing to a printer produces only blank pages | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Timo Schlüßler <timo> |
| Component: | Printing | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Critical | CC: | andersca, benjamin, menard |
| Priority: | P1 | Keywords: | Qt, QtTriaged |
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
Timo Schlüßler
When printing to a printer via QWebFrame::print(QPrinter *) the printer just prints blank white pages. When printing to a file (ps or pdf), everything gets printed fine.
Testcase:
int main(int argc, char *argv)
{
QApplication app(argc, argv);
QWebPage page;
QWebFrame *frame = page.mainFrame();
frame->setHtml("<html><body><p>test</p></body></html>");
QPrinter printer;
frame->print(&printer);
}
Printing anything else works very well, so that's the reason for me posting the bug here but not on qt's bugtracker.
The bug is known to exist in Qt 4.7.2/3 but in 4.7.0 it worked.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Benjamin Poulain
I just tried with QtWebKit 2.2 on Mac and printing works fine here.
I don't have a windows box to test.
Could you please:
-test spinning the even loop. I doubt we really support ending the application without any further event handler.
-Try with QtWebKit 2.2
Raising as P1 (regression) until someone test 2.2 on windows.
Timo Schlüßler
Adding "return app.exec();" doesn't change the print-output in any way.
Using a freshly compiled QtWebKit (I used tag qtwebkit-2.2-week20 from gitorious.org/webkit/qtwebkit) doesn't change anything as well.
Alexis Menard (darktears)
(In reply to comment #2)
> Adding "return app.exec();" doesn't change the print-output in any way.
> Using a freshly compiled QtWebKit (I used tag qtwebkit-2.2-week20 from gitorious.org/webkit/qtwebkit) doesn't change anything as well.
May be a bug in Qt then? Because between Qt 4.7.0 and Qt 4.7.3 I doubt WebKit in Qt changed at all.
Timo Schlüßler
Okay, I will report it as a bug to Qt then.