window

Qt-based Cube Renderer using PicoGL’s GLBase

This example demonstrates how to create a simple cube renderer using Qt’s QOpenGLWidget through PicoGL’s GLBase class. It’s designed for legacy displays and systems that prefer Qt over GLUT.

Features: - Legacy OpenGL rendering (compatible with older systems) - Mouse controls for rotation and zoom - Colorful cube with vertex colors - Qt-based window management - Cross-platform compatibility

Requirements: - PySide6 (Qt6) - PyOpenGL - NumPy - PicoGL

Usage:

python examples/qt_cube.py

Classes

LegacyQtObjectWindow

Main window for the Qt Object renderer

Module Contents

class window.LegacyQtObjectWindow(parent, gl_use_legacy=True)[source]

Bases: PySide6.QtWidgets.QMainWindow

Main window for the Qt Object renderer

parent[source]
gl_use_legacy = True[source]
layout: PySide6.QtWidgets.QVBoxLayout | None = None[source]
gl_widget: QtObjectRenderer | None = None[source]
object_file_path = None[source]
ui_init()[source]
abstract set_layout(layout)[source]
toggle_auto_rotate()[source]

Toggle auto-rotation

reset_view()[source]

Reset the view

keyPressEvent(event)[source]

Handle keyboard input at window level