Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67533

QWebEnginePage::setBackgroundColor(Qt::transparent) prevents rendering it with QPainter. Visual artefacts on transparent areas.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.11.1
    • 5.11.0 Beta 2
    • None
    • Debian 9 Stretch x86_64

      Qt 5.11.0 downloaded via official release channel.

       

    Description

      The attached simple test project (test.zip, only 13 lines of code) puts a QWebEnginePage on top of a QLabel. QWebEnginePage is set to a transparent page background (mainwindow.cpp line 14), so that the QLabel text is still visible behind it. After 1 second, MainWindow is rendered with a QPainter, and the resulting QImage is saved to /tmp/screenshot.png.

      When the application is run, its MainWindow displays correctly. However, the screenshot /tmp/screenshot.png only shows the QLabel, but not the QWebEnginePage.

      If the transparent background is not set, QWebEnginePage is present in the screenshot.

      Attachment Selection_135.jpg shows both the MainWindow as well as its screenshot side-by-side for comparison, when transparency is set, illustrating the problem.

      Attachment Selection_136.jpg shows both the MainWindow as well as its screenshot, without the transparency.

      In addition, both variants exhibit visual artefacts on top of the transparent areas.

      Attachments

        1. Selection_135.jpg
          Selection_135.jpg
          119 kB
        2. Selection_136.jpg
          Selection_136.jpg
          108 kB
        3. test.zip
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            michaelfranzl Michael Franzl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes