QT_HARMONYOS_ABILITY_ORIENTATION
The screen-orientation policy of the HarmonyOS ability.
This property was introduced in Qt 6.12.
Note: This property is in technology preview and may change in future releases.
Note: This property is used only if targeting the HarmonyOS platform.
Specifies the screen-orientation policy of the application's ability. The value is written to entry/src/main/module.json5 when the HAP package is built. The accepted values are the orientation strings defined by the HarmonyOS module.json5 schema, including auto_rotation, auto_rotation_restricted, landscape, portrait, auto_rotation_landscape, auto_rotation_portrait, and locked. An unrecognized value is ignored with a warning at HAP build time.
If this property is not set, the field is omitted from the manifest and the system default applies.
set_target_properties(myapp PROPERTIES
QT_HARMONYOS_ABILITY_ORIENTATION "landscape"
)© 2026 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.