Qt for Windows - Windows App SDK
Configuration
To use Windows App SDK in Qt apps, configure the SDK path.
Using Qt Creator
To configure the Windows App SDK in Qt Creator, go to Preferences > SDKs.
For more information, see Qt Creator Documentation.
From the 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 calledMicrosoft.WindowsAppSDK.{Version}
.For example, using the command-line:
cd Microsoft.WindowsAppSDK.* set WIN_APP_SDK_ROOT=%cd% setX WIN_APP_SDK_ROOT %cd%
Using the Windows App SDK in Qt apps
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()
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.