Qt for HarmonyOS/qtohosextras doc/Open Link Example
< Qt for HarmonyOS / qtohosextras doc
Open Link Example
Demonstrates opening a link with optional App Linking enforcement.
The window offers a URL field, an App Linking Only checkbox and an Open App Link button. On click the example obtains the default context via QOhosAbilityContext::getDefaultInstance(), creates options with QtOhosExtras::createOpenLinkOptions(), applies QOhosOpenLinkOptions::setAppLinkingOnly() from the checkbox and calls QOhosAbilityContext::tryOpenLink(). A failed call is reported in a warning box.