<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Building Qt6 for HarmonyOS]]></title><description><![CDATA[<p dir="auto"><a href="https://wiki.qt.io/Building_Qt6_for_HarmonyOS" target="_blank" rel="noopener noreferrer nofollow ugc">https://wiki.qt.io/Building_Qt6_for_HarmonyOS</a></p>
<p dir="auto"><strong>HarmonyOS SDK Version Requirements</strong></p>
<p dir="auto">The minimum supported HarmonyOS SDK API level is 23 from HarmonyOS 6.1.0 release.</p>
<p dir="auto"><strong>HUAWEI DevEco Studio Installation</strong></p>
<p dir="auto">See also Building Qt for HarmonyOS#HUAWEI DevEco Studio Installation .</p>
<p dir="auto">DevEco Studio is native IDE, it's available on Windows and macOS.</p>
<p dir="auto">If only for build you can also try Command Line Tools, which is available on Windows, Linux and macOS.</p>
<p dir="auto"><strong>Additional Packages</strong></p>
<p dir="auto">Qt 6 depends on lots of 3rdparty libraries, but HarmonyOS SDK doesn't provide them. So we have build one set for you - ohos-additional-packages-20260415.zip</p>
<p dir="auto">Google Drive: <a href="https://drive.google.com/file/d/1muyUjBPS8B0CLEoLAhtGgxNY6C6W7TTl/view?usp=share_link" target="_blank" rel="noopener noreferrer nofollow ugc">https://drive.google.com/file/d/1muyUjBPS8B0CLEoLAhtGgxNY6C6W7TTl/view?usp=share_link</a></p>
<p dir="auto">Baidu Netdisk: <a href="https://pan.baidu.com/s/1_x4mBtRuvwwO_oWjjH5CoQ?pwd=qtfh" target="_blank" rel="noopener noreferrer nofollow ugc">https://pan.baidu.com/s/1_x4mBtRuvwwO_oWjjH5CoQ?pwd=qtfh</a></p>
<p dir="auto">sha1sum: fe3b77744659922977efd926b54a2534ff142f6a</p>
<p dir="auto">This is only for development.</p>
<p dir="auto">About how to build additional package, see <a href="https://www.qt.io/blog/building-libraries-for-harmonyos-with-vcpkg" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.qt.io/blog/building-libraries-for-harmonyos-with-vcpkg</a> .</p>
<p dir="auto">You can put it to ~/.local/opt/ohos/additional-packages .</p>
<p dir="auto"><strong>How to get source code of qtbase</strong></p>
<p dir="auto">About gerrit and etc, details in Building Qt for HarmonyOS#Gerrit Introduction .</p>
<pre><code>$ cd ~/qt
$ git clone git://code.qt.io/qt/qtbase.git
$ cd qtbase
# add gerrit as remote
$ git remote add gerrit https://codereview.qt-project.org/qt/qtbase
$ git fetch gerrit
$ git checkout -b dev gerrit/dev
</code></pre>
<p dir="auto"><strong>Host Build</strong></p>
<p dir="auto">Use macOS(Apple Silicon) as example for now.</p>
<pre><code>$ cd ~/qt
$ mkdir qtbase-host-build
$ cd qtbase-host-build
$ ../qtbase/configure -developer-build -opensource -confirm-license -no-framework -nomake examples -nomake tests -verbose
$ cmake --build . --parallel -j14
</code></pre>
<p dir="auto"><strong>Target Build</strong></p>
<p dir="auto">With DevEco Studio installed, the sdk should be in /Applications/DevEco-Studio.app/Contents/sdk/default/openharmony/ .</p>
<pre><code>$ cd ~/qt
$ mkdir qtbase-harmonyos-build
$ cd qtbase-harmonyos-build
$ ../qtbase/configure -developer-build -debug -no-dbus -no-use-gold-linker -no-pch -openssl-runtime -ohos-sdk /Applications/DevEco-Studio.app/Contents/sdk/default/openharmony/ -ohos-abis arm64-v8a -qt-host-path ~/qt/qtbase-host-build -- -DCMAKE_FIND_ROOT_PATH=~/.local/opt/ohos/additional-packages
$ cmake --build . --parallel -j14
</code></pre>
<p dir="auto"><strong>Build HarmonyOS Project for an example</strong></p>
<pre><code>$ cd qtbase-harmonyos-build
$ cmake --build . --parallel -j14 --target gallery
$ cd examples/widgets/gallery
$ ~/qt/qtbase-host-build/bin/harmonydeployqt --verbose --hvigor /Applications/DevEco-Studio.app/Contents/tools/hvigor/bin/hvigorw --input ./gallery-harmony-deployment-settings.json
$ cd libgallery-harmonyos
$ pwd
</code></pre>
<p dir="auto">Use DevEco Studio to open the above project, sign it and build it and run it.</p>
<p dir="auto">Happy Hacking!</p>
]]></description><link>https://forum.qt.io/topic/164751/building-qt6-for-harmonyos</link><generator>RSS for Node</generator><lastBuildDate>Fri, 07 Aug 2026 21:50:44 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164751.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 05 Jun 2026 05:15:40 GMT</pubDate><ttl>60</ttl></channel></rss>