summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/textdocument-end/textdocumentendsnippet.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2025-07-31 11:58:43 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2025-07-31 20:48:22 +0200
commit97c87e786895928fd4a25d89ec2e45396bef970d (patch)
tree8f7a2a13208529d34be043b2aa7ca6ba4ac5eadb /src/gui/doc/snippets/textdocument-end/textdocumentendsnippet.cpp
parente00e77bc4136f70f2df36c892f4d3902871427d9 (diff)
QWidgetBaselineTest: Grab widget via render() instead of grab()
Going via QWidget::grab() will render to a QPixmap, which on most platforms is going to be QRasterPlatformPixmap. The format of the underlying QImage in that case is resolved from the primary screen, which most platforms report as QImage::Format_RGB32. This means we will not be able to detect the difference between black and fully transparent areas in the rendered result, which has been observed to be a problem for widget styles that wrongly render their controls using source composition. To solve this we render via QWidget::render() instead, to an image with an alpha format. Change-Id: I078f062b662590598c3597797abc2bfa78eaf86a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui/doc/snippets/textdocument-end/textdocumentendsnippet.cpp')
0 files changed, 0 insertions, 0 deletions