Nesta página

QNativeInterface::QCocoaGLContext Struct

Interface nativa para um NSOpenGLContext no macOS. Mais...

Cabeçalho: #include <QOpenGLContext>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Desde: Qt 6.0

Funções públicas

QCocoaGLContext()
QCocoaGLContext(const QNativeInterface::QCocoaGLContext &)
QCocoaGLContext(QNativeInterface::QCocoaGLContext &&)
virtual NSOpenGLContext *nativeContext() const = 0
QNativeInterface::QCocoaGLContext &operator=(QNativeInterface::QCocoaGLContext &&)
QNativeInterface::QCocoaGLContext &operator=(const QNativeInterface::QCocoaGLContext &)

Membros públicos estáticos

QOpenGLContext *fromNative(NSOpenGLContext *context, QOpenGLContext *shareContext = nullptr)

Descrição detalhada

Acessado por meio de ` QOpenGLContext::nativeInterface()`.

Documentação da função membro

[constexpr noexcept default] QCocoaGLContext::QCocoaGLContext()

Constrói, por padrão, uma instância de ` QCocoaGLContext`.

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

Cria uma instância de ` QCocoaGLContext` por meio de cópia. Essa função foi excluída.

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

Cria uma instância de ` QCocoaGLContext` por meio da construção `move`. Essa função foi excluída.

[static] QOpenGLContext *QCocoaGLContext::fromNative(NSOpenGLContext *context, QOpenGLContext *shareContext = nullptr)

Adota um NSOpenGLContext.

O `NSOpenGLContext` adotado context é retido. A propriedade do ` QOpenGLContext ` criado shareContext é transferida para o chamador.

[pure virtual] NSOpenGLContext *QCocoaGLContext::nativeContext() const

Retorna o NSOpenGLContext subjacente.

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

A função “Move-assigns” atribui “ other ” a esta instância de “ QCocoaGLContext ”. Essa função foi excluída.

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

Copia e atribui other a esta instância de QCocoaGLContext. Esta função foi excluída.

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