diff options
author | Jøger Hansegård <[email protected]> | 2024-08-14 12:06:08 +0200 |
---|---|---|
committer | Jøger Hansegård <[email protected]> | 2024-08-14 19:26:02 +0200 |
commit | 4e7f5c43a3be609502ccc15861319503dc2c842b (patch) | |
tree | 2b3c90ba2738eacbcc4863f70ec319c8586e17f1 | |
parent | 287f3097f22b7f9d6d9a39b6da6bbf96719f82f3 (diff) |
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.
Pick-to: 6.8
Change-Id: I3a2e4f6018b3d2aee883ab755b63ad75bc8c80e8
Reviewed-by: Oliver Wolff <[email protected]>
-rw-r--r-- | tests/manual/embeddedwindows/CMakeLists.txt | 5 | ||||
-rw-r--r-- | tests/manual/embeddedwindows/app.manifest | 12 |
2 files changed, 17 insertions, 0 deletions
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 @@ +<!-- +Copyright (C) 2024 The Qt Company Ltd. +SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +--> +<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> + <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!-- Supports Windows 10 and 11 --> + <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" /> + </application> + </compatibility> +</assembly> |