Nesta página

QNativeInterface::QGLXContext Struct

Interface nativa para um contexto GLX. 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

QGLXContext()
QGLXContext(const QNativeInterface::QGLXContext &)
QGLXContext(QNativeInterface::QGLXContext &&)
int nativeContext() const
QNativeInterface::QGLXContext &operator=(QNativeInterface::QGLXContext &&)
QNativeInterface::QGLXContext &operator=(const QNativeInterface::QGLXContext &)

Membros públicos estáticos

QOpenGLContext *fromNative(int configBasedContext, QOpenGLContext *shareContext = nullptr)
QOpenGLContext *fromNative(int visualBasedContext, void *visualInfo, QOpenGLContext *shareContext = nullptr)

Descrição detalhada

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

Documentação das funções-membro

[constexpr noexcept default] QGLXContext::QGLXContext()

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

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

Cria uma instância de ` QGLXContext` por meio de `copy`. Esta função foi excluída.

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

Cria uma instância d QGLXContext. Essa função foi excluída.

[static] QOpenGLContext *QGLXContext::fromNative(int configBasedContext, QOpenGLContext *shareContext = nullptr)

Adota um GLXContext configBasedContext criado a partir de um FBConfig.

O contexto deve ser criado a partir de uma configuração de framebuffer, utilizando a função ` glXCreateNewContext `.

A propriedade do QOpenGLContext criado shareContext é transferida para o chamador.

[static] QOpenGLContext *QGLXContext::fromNative(int visualBasedContext, void *visualInfo, QOpenGLContext *shareContext = nullptr)

Adota um GLXContext criado a partir de um visual X.

O contexto deve ser criado a partir de um visual, utilizando a função ` glXCreateContext `. O mesmo visual deve ser passado como um ponteiro para uma estrutura ` XVisualInfo `, no argumento ` visualInfo `.

A propriedade do QOpenGLContext criado é transferida para o chamador.

int QGLXContext::nativeContext() const

Retorna o GLXContext subjacente.

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

A função “Move” atribui o ` other ` a esta instância ` QGLXContext `. Essa função é excluída.

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

Copia e atribui other a esta instância QGLXContext. 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.