Search code examples
qtwindows-runtimewindows-store-appswindows-10windows-store

From Qt UI app to Windows 10 Store app


I have a Qt (5.6) UI application, and I convert it to Visual Studio project using

qmake -tp vc MyProject.pro CONFIG+=windeployqt

When I open the vcxproj in Visual Studio, I build successfully and can debug the app, but I don't have the option to upload the app to the Windows Store (Project->Store->Create/upload App Packages), because the Project menu doesn't contain Store submenu.

How can I upload my app to the Windows Store?


Solution

  • You should have at least Visual Studio 2015 installed (with Universal Windows Platform SDK) and Qt build for WinRT. Qt 5.8.0 WinRT installer can be downloaded here. To get the most for Windows 10 Universal Windows Platform you should use the latest version of the Qt.

    Once you have installed Qt WinRT, you can ask qmake to generate Visual Studio project file. Qt WinRT package provides 3 separate Qt builds per each supported CPU platform: x86, x64 and armv7. I recommend to keep generated Visual Studio project files for each platform in separate directories outside of your sources directory. CONFIG+=windeployqt is not required. Command line for x86 platform:

    cd %YOUR_PROJECT_ROOT%
    mkdir x86-VS-build
    cd x86-VS-build
    %x86_qt5.8.0_bin_path%/qmake.exe -tp vc "../MyProject.pro"
    

    Similar steps can be done for x64 and armv7 platforms, but in separate working directory to not mess the files.

    After opening of generated project file in Visual Studio, you should see missed menu options to interact with Windows Store. You should be able access Store menu in pop-up by mouse click on project files tree as well as from main menu.