From 322e55ff45951ebef88a1634f9e8c0fd7d6a2ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8ger=20Hanseg=C3=A5rd?= Date: Wed, 14 Aug 2024 12:06:08 +0200 Subject: [PATCH] Enable transparent windows with embeddedwindows example on Windows The embeddedwindows example illustrates embedding child windows with transparency enabled. On Windows, this is implemented using layered windows with the WS_EX_LAYERED extended window style. To make this work with child-windows, we need to mark the application as at least Windows 8 aware. Change-Id: I3a2e4f6018b3d2aee883ab755b63ad75bc8c80e8 Reviewed-by: Oliver Wolff (cherry picked from commit 4e7f5c43a3be609502ccc15861319503dc2c842b) Reviewed-by: Qt Cherry-pick Bot --- tests/manual/embeddedwindows/CMakeLists.txt | 5 +++++ tests/manual/embeddedwindows/app.manifest | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/manual/embeddedwindows/app.manifest diff --git a/tests/manual/embeddedwindows/CMakeLists.txt b/tests/manual/embeddedwindows/CMakeLists.txt index 814398631ec..0c0514a1725 100644 --- a/tests/manual/embeddedwindows/CMakeLists.txt +++ b/tests/manual/embeddedwindows/CMakeLists.txt @@ -8,6 +8,11 @@ qt_internal_add_manual_test(embeddedwindows Qt::Gui ) +qt_internal_extend_target(embeddedwindows CONDITION WIN32 + SOURCES + app.manifest +) + if(QT_FEATURE_xcb) target_link_libraries(embeddedwindows PRIVATE XCB::XCB) endif() diff --git a/tests/manual/embeddedwindows/app.manifest b/tests/manual/embeddedwindows/app.manifest new file mode 100644 index 00000000000..82c951cd831 --- /dev/null +++ b/tests/manual/embeddedwindows/app.manifest @@ -0,0 +1,12 @@ + + + + + + + + +