Jump to content

Qt for HarmonyOS/qtohosextras doc/Want FDs Receiver Example

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

< Qt for HarmonyOS / qtohosextras doc

Want FDs Receiver Example

Demonstrates receiving file descriptors passed to the application through a want.


The window logs every received want. For each entry in QOhosWant::fds the example prints the key, the descriptor value and the dev / ino numbers obtained with fstat, so they can be compared with the sender's log. Wants are handled both from QOhosAppContext::getAppLaunchWantInfo() at startup and from the QOhosAbilityContext::newWantInfoReceived() signal at runtime.