Qt for HarmonyOS/qtohosextras doc/Screen Display ID Example: Difference between revisions
Add example documentation from qdoc output (QTFOROH-2307) |
Fix example page conversion (QTFOROH-2307) |
||
| Line 9: | Line 9: | ||
The window shows the current display ID and a refresh button. The value is queried with QtOhosExtras::tryGetScreenDisplayId() for the screen of the window, once after the window is shown and again on every button click, so the window can be moved to another display and re-queried. A null result is shown as <code><invalid></code>. | The window shows the current display ID and a refresh button. The value is queried with QtOhosExtras::tryGetScreenDisplayId() for the screen of the window, once after the window is shown and again on every button click, so the window can be moved to another display and re-queried. A null result is shown as <code><invalid></code>. | ||
* [[Qt_for_HarmonyOS/qtohosextras_doc/Screen_Display_ID_Example|screendisplayid/screendisplayid.pro]] | * [[Qt_for_HarmonyOS/qtohosextras_doc/Screen_Display_ID_Example|screendisplayid/screendisplayid.pro]] | ||
[[Category:Qt for HarmonyOS]] | [[Category:Qt for HarmonyOS]] | ||
Revision as of 09:26, 16 September 2026
< Qt for HarmonyOS / qtohosextras doc
Screen Display ID Example
Demonstrates obtaining the native display ID of the screen a window is shown on.
The window shows the current display ID and a refresh button. The value is queried with QtOhosExtras::tryGetScreenDisplayId() for the screen of the window, once after the window is shown and again on every button click, so the window can be moved to another display and re-queried. A null result is shown as <invalid>.