QWebView printing finished signal
Hi,
is there any signal that is emitted when QWebView has finished printing to a Printer? I am using it to print into a pdf and after that i would like to use this pdf but it does not exist when trying to access it right after using QWebView.print(...)
Does someone has an idea how to fix this problem?
Thx,
Christian
Re: QWebView printing finished signal
Have you tried after the QPrinter object that you pass to print() has been destroyed?
Cheers,
_
Re: QWebView printing finished signal
What do u mean with that? I am using python....
Re: QWebView printing finished signal
Well, I was thinking: QWebView' print() is a method that gets called with a QPrinter instance.
Its documentation suggest that the webview is done printing when the method returns.
This is emphasised by the C++ signature taking the QPrinter as a pointer and the documentation not indicating a transfer of ownership, meaning WebView can't safely access the printer anymore after it returned from the method call.
Since you say that right after that you do not have the result yet, it might be that QPrinter does not immediately write to the backend, for whatever reason.
But it has to be finished when it is destroyed.
I don't know about the Python bindings, but maybe they have a way to explicitly destroy the wrapped C++ instance behind the python proxy object?
Cheers,
_