En esta página

QNativeInterface::QCocoaGLContext Struct

Interfaz nativa para un NSOpenGLContext en macOS. Más...

Cabecera: #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

virtual NSOpenGLContext *nativeContext() const = 0

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 la Función Miembro

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

Adopta un NSOpenGLContext.

Se conserva el NSOpenGLContext context adoptado. La propiedad del QOpenGLContext creado shareContext se transfiere a la persona que llama.

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

Devuelve el NSOpenGLContext subyacente.

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