54. gui.qtcanvas
— Interactive OpenGL Canvas embedded in a Qt widget.¶
This module implements user interaction with the OpenGL canvas defined in
module canvas
.
QtCanvas is a single interactive OpenGL canvas, while MultiCanvas
implements a dynamic array of multiple canvases.
54.1. Classes defined in module gui.qtcanvas¶
-
class
gui.qtcanvas.
CursorShapeHandler
(widget)[source]¶ A class for handling the mouse cursor shape on the Canvas.
-
class
gui.qtcanvas.
QtCanvas
(*args, **kargs)[source]¶ A canvas for OpenGL rendering.
This class provides interactive functionality for the OpenGL canvas provided by the
canvas.Canvas
class.Interactivity is highly dependent on Qt. Putting the interactive functions in a separate class makes it esier to use the Canvas class in non-interactive situations or combining it with other GUI toolsets.
The QtCanvas constructor may have positional and keyword arguments. The positional arguments are passed to the QtOpenGL.QGLWidget constructor, while the keyword arguments are passed to the canvas.Canvas constructor.