Results 1 to 4 of 4

Thread: QWebView printing finished signal

  1. #1
    Join Date
    Jul 2012
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: QWebView printing finished signal

    Have you tried after the QPrinter object that you pass to print() has been destroyed?

    Cheers,
    _

  3. #3
    Join Date
    Jul 2012
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWebView printing finished signal

    What do u mean with that? I am using python....

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default 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,
    _

Similar Threads

  1. Printing from QWebView
    By folibis in forum Qt Programming
    Replies: 1
    Last Post: 4th December 2013, 04:37
  2. Replies: 0
    Last Post: 29th April 2013, 12:47
  3. Detecting finished download of HTML content for QWebView
    By TropicalPenguin in forum Qt Programming
    Replies: 3
    Last Post: 21st June 2011, 20:44
  4. QNetworkAccessManager does not signal finished
    By lukas.zachy in forum Newbie
    Replies: 5
    Last Post: 26th January 2011, 10:05
  5. get finished signal from a thread
    By ProTonS in forum Qt Programming
    Replies: 4
    Last Post: 21st August 2009, 15:17

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.