Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
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.