legacy_qt_cube_simple

Simple Qt Cube Renderer - Minimal Dependencies

A minimal Qt OpenGL cube example routed through PicoGL’s legacy backend, mesh types, and state helpers instead of raw client-state draw calls.

Features: - Basic Qt OpenGL widget (PySide6 / PyQt5 / PyQt6) - PicoGL GLBackend + LegacyGLMesh rendering - Mouse controls and auto-rotation - Minimal dependencies beyond Qt, PyOpenGL, NumPy, and PicoGL

Usage:

python examples/legacy_qt_cube_simple.py

Attributes

QT_VERSION

Classes

SimpleQtCubeWidget

Minimal Qt cube widget using PicoGL legacy mesh + backend drivers.

SimpleQtCubeWindow

Main window hosting the simple PicoGL cube widget.

Functions

_to_np_array(data) → numpy.ndarray[Any, numpy.dtype[Any]] | numpy.ndarray[Any, numpy.dtype[numpy.generic]]

main()

Module Contents

legacy_qt_cube_simple.QT_VERSION = 'PySide6'[source]
legacy_qt_cube_simple._to_np_array(data) → numpy.ndarray[Any, numpy.dtype[Any]] | numpy.ndarray[Any, numpy.dtype[numpy.generic]][source]
class legacy_qt_cube_simple.SimpleQtCubeWidget(parent: PySide6.QtWidgets.QWidget | None = None)[source]

Bases: PySide6.QtOpenGLWidgets.QOpenGLWidget

Minimal Qt cube widget using PicoGL legacy mesh + backend drivers.

backend[source]
gl_mesh: picogl.renderer.legacy_glmesh.LegacyGLMesh | None = None[source]
_gl_ready = False[source]
vertices[source]
colors[source]
indices[source]
rotation_x = 0.0[source]
rotation_y = 0.0[source]
zoom = 5.0[source]
auto_rotate = True[source]
rotation_speed = 1.0[source]
last_mouse_pos = None[source]
timer[source]
initializeGL()[source]

Initialize OpenGL through PicoGL backend helpers.

resizeGL(w: int, h: int)[source]

Resize viewport and projection via PicoGL drivers.

_set_modelview() → None[source]

Match legacy Qt cube camera: eye on +Z axis, then orbit rotations.

paintGL()[source]

Render the cube through PicoGL frame clear + legacy mesh draw.

animate()[source]
mousePressEvent(event)[source]
mouseMoveEvent(event)[source]
wheelEvent(event)[source]
keyPressEvent(event)[source]
class legacy_qt_cube_simple.SimpleQtCubeWindow[source]

Bases: PySide6.QtWidgets.QMainWindow

Main window hosting the simple PicoGL cube widget.

gl_widget[source]
keyPressEvent(event)[source]
legacy_qt_cube_simple.main()[source]