Qt for HarmonyOS/qtohosextras doc/Qt Ohos Extras Examples
Qt Ohos Extras Examples
This page lists the examples available in the Qt Ohos Extras module.
Note: These examples are designed to run on OpenHarmony only.
| App Bundle Info Example | Demonstrates how to read the application's bundle information at runtime. |
| Application Continuation Example | Demonstrates cross-device application continuation with distributed data objects and file assets. |
| Audio Stream Usage Hint Example | Demonstrates tagging Qt sound playback with an OHOS audio stream usage hint. |
| Bundled Embedded UI Extension Example | Demonstrates binding Qt windows to bundled EmbeddedUIExtensionAbility instances by key. |
| Color Theme Example | Demonstrates selecting the application color theme and reacting to dark and light theme changes. |
| Context Menu on Long Press Example | Demonstrates enabling synthesized context-menu events for long-press touch input. |
| File Permissions Example | Demonstrates how to use the file permissions API in QtOhosExtras to grant and check access to files. |
| File Utils Example | Demonstrates moving a user-selected file to the system trash. |
| Keep Screen On Example | Demonstrates keeping the screen on while a window is displayed. |
| Native Window ID Example | Demonstrates obtaining the native OHOS window ID of a Qt window. |
| Open Link Example | Demonstrates opening a link with optional App Linking enforcement. |
| Preload Example | Demonstrates handling the Preload launch reason so a preloaded ability shows its window only when actually started. |
| Request Permission Example | Demonstrates requesting application permissions from the user, per main window, by enum and by name. |
| Restart Application Example | Demonstrates restarting the application with or without its launch want parameters. |
| Screen Display ID Example | Demonstrates obtaining the native display ID of the screen a window is shown on. |
| Serial Port Permissions Example | Demonstrates requesting and checking OHOS serial port access rights. |
| Share Data Example | Demonstrates sharing text, file and URL records with other applications through OHOS Share Kit. |
| Share Data Receiver Example | Demonstrates receiving Share Kit records delivered to the application through a want. |
| Start Ability For Result Example | Demonstrates starting another UIAbility and receiving its result asynchronously. |
| Start Options Example | Demonstrates configuring the full set of QOhosStartOptions fields when starting another ability. |
| Want FDs Receiver Example | Demonstrates receiving file descriptors passed to the application through a want. |
| Want FDs Sender Example | Demonstrates sending open file descriptors to another ability through a want. |
| Window Corner Radius Example | Demonstrates setting rounded corners on a Qt window. |
| Window Drag Resize Example | Demonstrates enabling drag-resize on sub windows and floating windows. |