[Interest] Windows Phone & landscape orientation

Knight Andrew Andrew.Knight at digia.com
Sun Aug 17 17:44:09 CEST 2014


Alexander Ivash wrote:
> How to specify landscape orientation for Windows Phone app?

On Windows Phone 8.0, you can't do this in Qt apps (or native apps in general, unless you implement rotation yourself). This has been fixed in WP8.1 in the upcoming Qt 5.4; apps automatically rotate by default. That said, you can rotate the content item if you are using QML (e.g. by binding to Screen.orientation). See https://bugreports.qt-project.org/browse/QTBUG-35953 for more info.

> As I understand this can be done by modifying AppxManifest.xml, but I don't see such a file inside release folder.

The file called WMAppManifest.xml on WP8.0. On WP8.1, AppxManifest.xml does get generated and you can add the supported orientations there. Normally, you don't modify this file though, you edit your .pro file instead by adding items to WINRT_MANIFEST (see http://qt-project.org/doc/qt-5/qmake-variable-reference.html#winrt-manifest). As we haven't added orientations there yet, I've created a bug to track this missing feature: https://bugreports.qt-project.org/browse/QTBUG-40830

HTH,
Andrew


More information about the Interest mailing list