Jump to content

Qt for HarmonyOS/qtohosextras doc/Window Drag Resize Example

From Qt Wiki
Revision as of 09:16, 16 September 2026 by Shawn Luo (talk | contribs) (Add example documentation from qdoc output (QTFOROH-2307))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

< Qt for HarmonyOS / qtohosextras doc

Window Drag Resize Example

Demonstrates enabling drag-resize on sub windows and floating windows.


The main window creates either a sub window or a floating window; the floating variant is marked with QtOhosExtras::setShowWindowAsFloatWindowHint() before being shown. Each created window contains a toggle button that calls QtOhosExtras::setWindowDragResizable() with the checked state, enabling or disabling resize by dragging.

Note: The functionality only applies to sub windows and floating windows; application main windows are not supported. The QWidget overload may be called before or after the window is shown.

Files: