On this page

QNativeInterface::QHarmonyScreen Struct

Native interface to a screen on HarmonyOS. More...

Header: #include <QScreen>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui

Public Functions

QHarmonyScreen()
QHarmonyScreen(const QNativeInterface::QHarmonyScreen &)
QHarmonyScreen(QNativeInterface::QHarmonyScreen &&)
virtual qint64 displayId() const = 0
QNativeInterface::QHarmonyScreen &operator=(QNativeInterface::QHarmonyScreen &&)
QNativeInterface::QHarmonyScreen &operator=(const QNativeInterface::QHarmonyScreen &)

Detailed Description

Accessed through QScreen::nativeInterface().

See also Qt for HarmonyOS Platform API.

Member Function Documentation

[constexpr noexcept default] QHarmonyScreen::QHarmonyScreen()

Default-constructs an instance of QHarmonyScreen.

[delete] QHarmonyScreen::QHarmonyScreen(const QNativeInterface::QHarmonyScreen &)

Copy-constructs an instance of QHarmonyScreen. This function is deleted.

[delete] QHarmonyScreen::QHarmonyScreen(QNativeInterface::QHarmonyScreen &&)

Move-constructs an instance of QHarmonyScreen. This function is deleted.

[pure virtual] qint64 QHarmonyScreen::displayId() const

Returns the ID of the display that the screen represents. Platform APIs that work on a display, such as those of the @ohos.display module, identify it by this ID.

A screen can come to represent another display when the platform reports a display change, for example when a display is added or removed. The ID of a screen can therefore change over its lifetime.

[delete] QNativeInterface::QHarmonyScreen &QHarmonyScreen::operator=(QNativeInterface::QHarmonyScreen &&)

Move-assigns other to this QHarmonyScreen instance. This function is deleted.

[delete] QNativeInterface::QHarmonyScreen &QHarmonyScreen::operator=(const QNativeInterface::QHarmonyScreen &)

Copy-assigns other to this QHarmonyScreen instance. This function is deleted.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.