Jump to content

Qt for HarmonyOS/qtohosextras doc/App Bundle Info Example

From Qt Wiki
Revision as of 09:18, 16 September 2026 by Shawn Luo (talk | contribs) (Fix example page conversion (QTFOROH-2307))

< Qt for HarmonyOS / qtohosextras doc

App Bundle Info Example

Demonstrates how to read the application's bundle information at runtime.


The example shows a single label with the application's version code. The value is obtained at startup with QtOhosExtras::QOhosAppContext::instance(), followed by QOhosAppContext::getBundleInfo() and QOhosBundleInfo::versionCode(). The call is synchronous, so no signal handling is required.