On this page

Building and Deploying Qt Applications for HarmonyOS

Note: Qt for HarmonyOS is in technology preview and may change in future releases.

This page describes how to build and package a Qt application for HarmonyOS, and how to run it on a device or the emulator.

Packaging into a HAP

Note: You can build Qt applications for HarmonyOS with either CMake or qmake, but packaging an application into a HAP and deploying it is only supported with CMake.

HarmonyOS applications ship as HarmonyOS Ability Packages (HAPs). When you create a Qt application executable with qt_add_executable() while targeting HarmonyOS, Qt automatically generates a <target>_make_hap build target. Building that target produces the HAP for your application:

cmake --build . --target <target>_make_hap

How deployment works

The <target>_make_hap target runs harmonydeployqt, the HarmonyOS deployment tool. It follows the same approach as androiddeployqt: it collects the application's shared library, the HarmonyOS platform plugin (libqohos.so), the required Qt modules, and, for Qt Quick applications, the QML modules, and places them into a HarmonyOS application template. It then invokes the OpenHarmony hvigor build tool to assemble the final HAP.

To configure the metadata written into the HarmonyOS manifests (app.json5 and module.json5) and to declare permissions, use the commands described in Qt for HarmonyOS CMake API.

Running the application

Install and run the resulting HAP on a connected HarmonyOS device or on the emulator. The most convenient way to deploy and debug is to open the generated project in DevEco Studio and use its run and debug tooling.

© 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.