[SOLVED] No -graphicssystem opengl build and QGLWidget together?

  • I had some problems with Qt 4.7.3 x64 build with msvc2010 -graphicssystem opengl. I was using Windows 7 64 bits. Using and avoiding QGLWidget in simple programs.
    => Menus refresh problems
    =>QtGui unhandled exceptions (if the program had the class QGLWidget instanced)

    Magically, simply building Qt again without -graphicssystem opengl (Qt raster), removed the problems.

    As I did not see BIG WARNING LIGHTS in the configure --help that Qt with opengl does not support QGLWidget (?!), I leave this warning to all here.

    What I don't understand is why am I not able to use QGLWidet and the graphicsystem option for opengl together? After all, QGLWidget is a class from Qt that uses opengl...

  • The graphics system option sets the graphics backend (see http://doc.qt.nokia.com/4.7/qapplication.html#setGraphicsSystem), but the opengl backend is experimental. Using the opengl backend means that all widgets are rendered through OpenGL. However, since it is experimental, there may be rendering errors (like the menu refresh problems and unhandled exceptions).

  • Thanks. Do you know if -qgraphicssystem opengl build is going to support QGLWidget`s?
    I saw somewhere (Qt-BUG report, probably) that it will not be supported.

  • I would not expect it to ever happen for Qt 4. However, with Qt 5, OpenGL will be required. So, although it may not be the current OpenGL paint engine, some OpenGL backend will be the default graphics system.

    See also:

  • Thanks for the links Bradley. Nailed it for me. :)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.