# QGLWidget Class Reference

### [com.trolltech.qt.opengl package]

Inherits QWidget.

### Constructor

- void QGLWidget(QGLContext context, QWidget parent, QGLWidget shareWidget, WindowFlags f)
- void QGLWidget(QWidget parent, QGLWidget shareWidget, WindowFlags f)
- void QGLWidget(QGLFormat format, QWidget parent, QGLWidget shareWidget, WindowFlags f)

### Constructor Properties

- prototype: The QGLWidget prototype object
- QImage convertToGLFormat(QImage img)

### Prototype Object Properties

The QGLWidget prototype object inherits properties from the QWidget prototype object and also has the following properties.

- QGLColormap colormap()
- QGLContext context()
- void doneCurrent()
- bool doubleBuffer()
- QGLFormat format()
- QImage grabFrameBuffer(bool withAlpha)
- bool isSharing()
- bool isValid()
- void makeCurrent()
- void makeOverlayCurrent()
- QGLContext overlayContext()
- void qglClearColor(QColor c)
- void qglColor(QColor c)
- QPixmap renderPixmap(int w, int h, bool useContext)
- void renderText(double x, double y, double z, String str, QFont fnt, int listBase)
- void setColormap(QGLColormap map)
- void swapBuffers()

### Instance Properties

QGLWidget objects have no special properties beyond those inherited from the QGLWidget prototype object.