I wrote a class that inherits from QGLWidget, and it worked fine when I initially wrote it.
However, suppose I add another data member to the class, like "int foo;". When I run my program, I am just greeted by a black window (since black is the clear color).
I wanted to see what was going on in paintEvent (if it was even firing), so I added another data member ("ofstream foo2"), and printed messages out it. Unfortunately, when I add this data member in addition to the int, everything renders fine again.
I can provide more details if necessary.
Bookmarks