Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. QWebEngineView->print() with Preview before loadFinished()
Forum Updated to NodeBB v4.3 + New Features

QWebEngineView->print() with Preview before loadFinished()

Scheduled Pinned Locked Moved Unsolved QtWebEngine
2 Posts 2 Posters 350 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Volker75
    wrote on last edited by Volker75
    #1

    Hallo,

    I currently try to convert my printing functions from QTextDocument to QWebEngineView, since QTextDocument doesn't support right to left languages in tables correct. This bug was already reported over 10 years ago and got only a P3 flag. So I guess it won't be fixed in the next 10 years too.

    During this conversion I noticed that it look like QPrintPreviewDialog preview shows only empty pages if the load is not finished and or convertred to QPainter. Of course I coded a signal now that wait for loadFinished() and now the print previews looks like it is always working fine.

    But I must write this "fix" in many other places also. So i just wonder if there is ever a reason to preview if load isn't finished. If not:
    What do you think about preview only if load is finished by default? In my opinion that is the only useful case and it would save me a lot of code if Qt behave like this.

    Should we write a bug/feature request about this in the bug tracker?

    hmm... I fear it is difficult to know that QPainter isn't ready for the PrintPreviewDialog since QWebEngineView reports to late that it is still rendering?

    Best Regards

    JonBJ 1 Reply Last reply
    0
    • V Volker75

      Hallo,

      I currently try to convert my printing functions from QTextDocument to QWebEngineView, since QTextDocument doesn't support right to left languages in tables correct. This bug was already reported over 10 years ago and got only a P3 flag. So I guess it won't be fixed in the next 10 years too.

      During this conversion I noticed that it look like QPrintPreviewDialog preview shows only empty pages if the load is not finished and or convertred to QPainter. Of course I coded a signal now that wait for loadFinished() and now the print previews looks like it is always working fine.

      But I must write this "fix" in many other places also. So i just wonder if there is ever a reason to preview if load isn't finished. If not:
      What do you think about preview only if load is finished by default? In my opinion that is the only useful case and it would save me a lot of code if Qt behave like this.

      Should we write a bug/feature request about this in the bug tracker?

      hmm... I fear it is difficult to know that QPainter isn't ready for the PrintPreviewDialog since QWebEngineView reports to late that it is still rendering?

      Best Regards

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Volker75
      Yes, my recollection is you do have to attach a slot to loadFinished() for printing to work, doubtless previewing too. Seems reasonable to me.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved