Windows App SDK Support
January 22, 2025 by Morteza Jamshidi | Comments
We're happy to announce the first release of our Windows App SDK official support in Qt!
Before this version of Qt, developers had to integrate the Windows App SDK manually. However, with the release of Qt Creator 16, this process will become much easier, allowing developers to use the Windows App SDK in their Qt apps and libraries seamlessly.
What is Windows App SDK?
The Windows App SDK, formerly known as Project Reunion, is Microsoft’s initiative to provide a cohesive development platform for building modern, native Windows applications. It unifies various tools, libraries, and frameworks to simplify app development while ensuring compatibility across different versions of Windows. This approach allows developers to leverage the best of both Win32 and Universal Windows Platform (UWP) environments in a single project.
Key Features and Components:
-
WinUI (Windows UI Library):
Provides modern user interface controls and styles for building visually appealing and responsive applications.
Supports high-DPI displays, touch input, and fluent design principles for an enhanced user experience.
-
WebView2:
Integrates web content into native applications using the Microsoft Edge Chromium engine.
Ensures seamless embedding of HTML, CSS, and JavaScript alongside native code.
-
Advanced App Lifecycle Management:
Offers robust support for app activation, background tasks, and state restoration.
Facilitates optimal performance and efficient resource utilization.
-
Cross-Version Compatibility:
Enables apps to run on a wide range of Windows versions without requiring multiple codebases.
Reduces development complexity and maintenance efforts.
-
Consistent API Surface:
Introduces a unified set of APIs for modern app development, replacing fragmented approaches of the past.
Simplifies access to advanced system features like notifications, windowing, and file handling.
Setup
There are two ways to integrate the Windows App SDK with Qt:
Using Qt Creator:
Details can be found in the Qt Creator Documentation.
Using Command line:
- Go to an empty directory.
Example:mkdir C:\Dev\wasdk
cd C:\Dev\wasdk -
Download NuGet into that directory.
For example, to download with PowerShell from the command line:
powershell.exe -Command "& {Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile nuget.exe}" -
Download the Windows App SDK with NuGet.
nuget.exe install Microsoft.WindowsAppSDK -OutputDirectory ./
-
Set the WIN_APP_SDK_ROOT environment variable to the Windows APP SDK directory, usually called Microsoft.WindowsAppSDK.{Version}.
For example, using the command-line:
cd Microsoft.WindowsAppSDK.*
set WIN_APP_SDK_ROOT=%cd%
setX WIN_APP_SDK_ROOT %cd%Note: The set command assigns the variable locally, while setX assigns it globally.
Usage
Call qt_add_win_app_sdk(ProjectName)
CMake function in the project's CMake file.
Replace ProjectName with your project name.
Use a condition to ensure the build is only for MSVC builds:
if (MSVC)
qt_add_win_app_sdk(ProjectName)
endif()
Comments
Subscribe to our newsletter
Subscribe Newsletter
Try Qt 6.8 Now!
Download the latest release here: www.qt.io/download.
Qt 6.8 release focuses on technology trends like spatial computing & XR, complex data visualization in 2D & 3D, and ARM-based development for desktop.
We're Hiring
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.