QNativeInterface::QCocoaGLContext Struct
macOS 上 NSOpenGLContext 的原生接口。更多内容...
| 头文件: | #include <QOpenGLContext> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| 自: | Qt 6.0 |
- 所有成员的列表,包括继承的成员
- QCocoaGLContext 属于“原生接口”部分。
公共函数
| QCocoaGLContext() | |
| QCocoaGLContext(const QNativeInterface::QCocoaGLContext &) | |
| QCocoaGLContext(QNativeInterface::QCocoaGLContext &&) | |
| virtual NSOpenGLContext * | nativeContext() const = 0 |
| QNativeInterface::QCocoaGLContext & | operator=(QNativeInterface::QCocoaGLContext &&) |
| QNativeInterface::QCocoaGLContext & | operator=(const QNativeInterface::QCocoaGLContext &) |
静态公共成员
| QOpenGLContext * | fromNative(NSOpenGLContext *context, QOpenGLContext *shareContext = nullptr) |
详细说明
可通过QOpenGLContext::nativeInterface()访问。
成员函数文档
[constexpr noexcept default] QCocoaGLContext::QCocoaGLContext()
默认——构造一个QCocoaGLContext 实例。
[delete] QCocoaGLContext::QCocoaGLContext(const QNativeInterface::QCocoaGLContext &)
复制并构造一个QCocoaGLContext 实例。该函数已被删除。
[delete] QCocoaGLContext::QCocoaGLContext(QNativeInterface::QCocoaGLContext &&)
通过移动构造一个QCocoaGLContext 实例。该函数已被删除。
[static] QOpenGLContext *QCocoaGLContext::fromNative(NSOpenGLContext *context, QOpenGLContext *shareContext = nullptr)
采用一个 NSOpenGLContext。
所采用的 NSOpenGLContextcontext 会被保留。所创建的QOpenGLContext shareContext 的所有权将转移给调用方。
[pure virtual] NSOpenGLContext *QCocoaGLContext::nativeContext() const
返回底层的 NSOpenGLContext。
[delete] QNativeInterface::QCocoaGLContext &QCocoaGLContext::operator=(QNativeInterface::QCocoaGLContext &&)
将other 按“移动赋值”方式赋值给此QCocoaGLContext 实例。该函数已被删除。
[delete] QNativeInterface::QCocoaGLContext &QCocoaGLContext::operator=(const QNativeInterface::QCocoaGLContext &)
将other 复制并赋值给该QCocoaGLContext 实例。此函数已被删除。
© 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.