From Qt UI app to Windows 10 Store app

跟風遠走 提交于 2021-02-06 14:00:57

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/43696551/from-qt-ui-app-to-windows-10-store-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!