Important: Please read the Qt Code of Conduct -

Qt OpenGL: Assertion Failed When Closing Window

  • Hi,

    I'm writing a graphics program in Qt with OpenGL. When I try to close the program, there is a debug error says:

    bq. Program: [directory of my program]
    Module: 4.7.2
    File: global\qglobal.cpp
    Line: 2262
    ASSERT: "group->context() == q_ptr" in file .\qgl.cpp, line 1657

    This error even occurs when I just close the example program (chap20\tetrahedron) of book "C++ GUI Programming with Qt 4, Second Edition".
    I'm using VS 2010 on Win 7 64bit, could anyone help me on this? Thanks.

  • Hi,

    as mentioned "here": it has something to do with the format set in the constructor. When I remove it, the program doesn't crash anymore but it only shows the legend and the background. So this doesn't really fix the problem...

    OpenGlViewer::OpenGlViewer(QWidget *parent): QGLWidget(parent)

Log in to reply