本页内容

QNativeInterface::QCocoaScreen Struct

macOS 上屏幕的原生接口。更多内容...

标题: #include <QScreen>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
自: Qt 6.11

公共函数

QCocoaScreen()
QCocoaScreen(const QNativeInterface::QCocoaScreen &)
QCocoaScreen(QNativeInterface::QCocoaScreen &&)
int *nativeScreen() const
QNativeInterface::QCocoaScreen &operator=(QNativeInterface::QCocoaScreen &&)
QNativeInterface::QCocoaScreen &operator=(const QNativeInterface::QCocoaScreen &)

详细说明

通过QScreen::nativeInterface()访问。

成员函数文档

[constexpr noexcept default] QCocoaScreen::QCocoaScreen()

默认构造一个QCocoaScreen 实例。

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

复制并构造一个QCocoaScreen 实例。该函数已被删除。

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

通过移动构造一个QCocoaScreen 实例。该函数已被删除。

int *QCocoaScreen::nativeScreen() const

返回此QScreen 的底层NSScreen。

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

将other 按移动赋值方式赋值给此QCocoaScreen 实例。该函数已被删除。

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

将other 复制并赋值给此QCocoaScreen 实例。该函数已被删除。

© 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.