![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Native interface to a window on HarmonyOS. More...
Native interface to a window on HarmonyOS.
Accessed through QWindow::nativeInterface().
On HarmonyOS, an ArkTS UIAbility instance shows a top-level QWindow in a window.Window. Platform APIs that are bound to a window need these objects, for example a picker that opens over the window, or an ability started from it. This interface provides them as QHarmonyJsObjectRef handles, which you dereference on the JS thread. Only top-level windows are shown this way. For a child window, both functions return null references. Use the interface of its top-level window instead.
Both functions return at once, without waiting for the JS thread. The objects are available when QWindow::show() returns and stay the same while the window stays visible and top-level. After the window is hidden or reparented, the functions may return null references. Showing the window again, or recreating it with QWindow::destroy() and show(), may give different objects.
This interface does not track what the platform does with the objects. If the platform destroys the ability or the window.Window, the functions may still return references to the destroyed objects, and code that uses the references on the JS thread must handle that.
\inmodule QtGui \inheaderfile QWindow