Qt OpenGL: Assertion Failed When Closing Window
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]
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.
as mentioned "here":http://www.qtcentre.org/threads/50560-Qt-OpenGL-Assertion-Failed-When-Close-the-Window 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)