Xbox One retail kits are fully capable of running Microsoft’s UWP (Universal Windows Platform) apps, and QT5 is capable of running in UWP (also known as winrt) mode. This includes running hardware accelerated QML and native/Qt C++.
Get Your Xbox One Setup
- Install the «Dev Mode Activation» App from app store
- Run it.
- The xbox will reboot a few times and download a future firmware. Mostly wait and click through the installers.
- Eventually you will have to «Activate» Dev mode.
- You will see a prompt to go to https://developer.microsoft.com/xboxactivate. This url doesn’t work until you pay for a Microsoft Dev Center account. It costs about $20. I didn’t see a way around buying the account.
Get Your PC setup
- Have Windows 10
- Download MSVC 2015 Community edition update 2.
- Ensure that both Visual C++ and Universal Windows App Development Tools are selected for installation
- Download and install Qt5
- Ensure Universal Windows Platform x64 (MSVC2015) is selected for instalation.
Convert a Qmake Project to a Visual Studio sln.
After using qt creator to create a QT Quick Application, and testing to make sure it launches locally.
CONFIG += windeployqtto your .pro file
- In a cmd.exe window, Activate VS2015 amd64 environment
- For some reason, VS2015 is called Microsoft Visual Studio 14.0
- The macro for
_MSC_VERis 1900. See the wikipedia article on visual studio for the full table of weird version numbers.
- Use qmake to generate a .vcxproj from the .pro file
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 C:\Qt\5.6\winrt_x64_msvc2015\bin\qmake -tp vc xboxfun.pro start xboxfun.vcxproj
There will now be a .vcxproj matching the name of your .pro file in the directory you ran qmake in. Open the vcxproj, if you are prompted for a VS version, select 2015.
If you debug your app in Visual Studio, it should still launch correctly on your PC.
Setting up Xbox One Remote Debugging
- In Visual Studio, go to the project properties of the generate vcxproj >> Debugging >> Debugger to launch:
- Change to Remote Machine
- Set Machine Name to Xbox One’s IP address
- Leave Authentication Mode as Universal (Unencrypted Protocol)
- Press Ok to save and close the Property Pages window.
- Run Debug.