윈도우용 Qt - 윈도우 앱 SDK

구성

Qt 앱에서 Windows 앱 SDK를 사용하려면 SDK 경로를 구성합니다.

사용 Qt Creator

Qt Creator 에서 Windows 앱 SDK를 구성하려면 Preferences > SDKs 로 이동합니다.

\QC SDK 환경설정.

자세한 내용은 Qt Creator 문서를 참조하십시오.

명령줄에서

  1. 빈 디렉토리로 이동합니다.

    예:

    mkdir C:\Dev\wasdk
    cd C:\Dev\wasdk
  2. 해당 디렉터리에 NuGet을 다운로드합니다.

    예를 들어 명령줄에서 PowerShell을 사용하여 다운로드합니다:

    powershell.exe -Command "& {Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile nuget.exe}"
  3. NuGet을 사용하여 Windows 앱 SDK를 다운로드합니다.
    nuget.exe install Microsoft.WindowsAppSDK -OutputDirectory ./
  4. WIN_APP_SDK_ROOT 환경 변수를 일반적으로 Microsoft.WindowsAppSDK.{Version} 이라고 하는 Windows 앱 SDK 디렉터리로 설정합니다.

    예를 들어 명령줄을 사용합니다:

    cd Microsoft.WindowsAppSDK.*
    set WIN_APP_SDK_ROOT=%cd%
    setX WIN_APP_SDK_ROOT %cd%

Qt 앱에서 윈도우 앱 SDK 사용하기

프로젝트의 CMake 파일에서 qt_add_win_app_sdk(ProjectName) CMake 함수를 호출합니다. ProjectName을 프로젝트 이름으로 바꿉니다.

조건을 사용하여 빌드가 MSVC 빌드 전용인지 확인합니다:

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.