Obsolete Members for QGLWidget
The following members of class QGLWidget are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
| ||setContext(QGLContext *context, const QGLContext *shareContext = Q_NULLPTR, bool deleteOldContext = true)|
| ||setFormat(const QGLFormat &format)|
- 3 public functions inherited from QWidget
Member Function Documentation
void QGLWidget::setContext(QGLContext *context, const QGLContext *shareContext = Q_NULLPTR, bool deleteOldContext = true)
If context is invalid, this method will try to keep display list and texture object sharing in effect, or (if shareContext points to a valid context) start display list and texture object sharing with that context, but sharing might be impossible if the two contexts have different formats. Use isSharing() to see whether sharing is in effect.
If deleteOldContext is true (the default), the existing context will be deleted. You may use false here if you have kept a pointer to the old context (as returned by context()), and want to restore that context later.
Note: This function is obsolete and should no longer be used. If you were using it to recreate the context for a QGLWidget, you should instead create a new QGLWidget or use the QOpenGLContext API in conjunction with QWindow. There is currently no officially supported way to substitute QGLWidget's context with your own implementation of QGLContext.
void QGLWidget::setFormat(const QGLFormat &format)
Sets a new format for this widget.
If the underlying OpenGL/Window system cannot satisfy all the features requested in format, the nearest subset of features will be used. After creation, the format() method will return the actual rendering context format obtained.
This method will try to keep display list and texture object sharing in effect with other QGLWidget objects, but changing the format might make sharing impossible. Use isSharing() to see if sharing is still in effect.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.