En esta página

QNativeInterface::QCocoaGLContext Struct

Interfaz nativa para un NSOpenGLContext en macOS. Más información...

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

Funciones 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 &)

Miembros públicos estáticos

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

Descripción detallada

Se accede a través de ` QOpenGLContext::nativeInterface()`.

Documentación de las funciones de miembro

[constexpr noexcept default] QCocoaGLContext::QCocoaGLContext()

Crea por defecto una instancia de ` QCocoaGLContext`.

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

Crea una instancia de « QCocoaGLContext » mediante copia. Esta función se ha eliminado.

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

Crea una instancia de ` QCocoaGLContext`. Esta función se ha eliminado.

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

Adopta un objeto `NSOpenGLContext`.

Se conserva el objeto NSOpenGLContext context adoptado. La propiedad del objeto QOpenGLContext shareContext creado se transfiere al llamante.

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

Devuelve el objeto NSOpenGLContext subyacente.

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

Asigna mediante «move» other a esta instancia de QCocoaGLContext. Esta función se elimina.

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

Asigna por copia other a esta instancia de QCocoaGLContext. Esta función se ha eliminado.

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