diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-09-09 15:31:26 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-09-11 12:32:52 +0200 |
commit | 1bb96cfcce47152c578bcc9a7c2ad80b0f0e6553 (patch) | |
tree | ab85a4c42c6e4dfb1c10c41dea0daf23402439cc /tests | |
parent | 2b566231a6e35ee1646754cee09b30fc99240a80 (diff) |
Request correct alpha composition on the rhi code path
Task-number: QTBUG-78089
Change-Id: I22f8bb5ec0af33397df14e064a0306bd4c5a5ef5
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/manual/nodetypes_ng/nodetypes_ng.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/manual/nodetypes_ng/nodetypes_ng.cpp b/tests/manual/nodetypes_ng/nodetypes_ng.cpp index 829002b538..8fe0e0dc98 100644 --- a/tests/manual/nodetypes_ng/nodetypes_ng.cpp +++ b/tests/manual/nodetypes_ng/nodetypes_ng.cpp @@ -301,6 +301,13 @@ int main(int argc, char **argv) fmt.setProfile(QSurfaceFormat::CoreProfile); view.setFormat(fmt); } + if (app.arguments().contains(QLatin1String("--transparent"))) { + qDebug("Requesting alpha channel for the window and using Qt::transparent as background"); + QSurfaceFormat fmt = view.format(); + fmt.setAlphaBufferSize(8); + view.setFormat(fmt); + view.setColor(Qt::transparent); + } view.engine()->rootContext()->setContextProperty(QLatin1String("helper"), &helper); |