-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[opengl] add QGL*<->QOpenGL* aliases
- Loading branch information
1 parent
500de5d
commit deceed0
Showing
2 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
import pytest | ||
|
||
import qtpy | ||
from qtpy import PYSIDE2, PYSIDE6, PYQT5, PYQT6 | ||
|
||
|
||
def test_qtopengl(): | ||
"""Test the qtpy.QtOpenGL namespace""" | ||
from qtpy import QtOpenGL | ||
print(qtpy.API) | ||
|
||
# This list is take from https://doc.qt.io/qtforpython-5/PySide2/QtOpenGL/index.html | ||
# This list is taken from https://doc.qt.io/qtforpython-5/PySide2/QtOpenGL/index.html | ||
# and may not be exhaustive | ||
assert QtOpenGL.QGL is not None | ||
assert QtOpenGL.QGLBuffer is not None | ||
assert QtOpenGL.QGLColormap is not None | ||
if PYSIDE2 or PYQT5: | ||
assert QtOpenGL.QGL is not None | ||
assert QtOpenGL.QGLBuffer is not None | ||
assert QtOpenGL.QGLFormat is not None | ||
assert QtOpenGL.QGLWidget is not None | ||
assert QtOpenGL.QGLColormap is not None | ||
assert QtOpenGL.QGLPixelBuffer is not None | ||
|
||
assert QtOpenGL.QGLContext is not None | ||
assert QtOpenGL.QGLFormat is not None | ||
assert QtOpenGL.QGLFramebufferObject is not None | ||
assert QtOpenGL.QGLFramebufferObjectFormat is not None | ||
assert QtOpenGL.QGLPixelBuffer is not None | ||
assert QtOpenGL.QGLShader is not None | ||
assert QtOpenGL.QGLShaderProgram is not None | ||
assert QtOpenGL.QGLWidget is not None | ||
|
||
|