I'm creating a level editor for my game using Qt for gui and i'm in really early stages. Right now i'm trying to dynamically add objects ( entities ) on screen when i click a button. So far the objects are pushed into a stack but i can't see them on screen.
When my widget inherits QGLWidget the screen is updated immediately and i can see the objects being drawn but since QGLWidget is deprecated i use QOpenGLWidget.
Strangely this class does not auto update the screen. I have also connected update() to a timer and set the interval to 0 to update the screen in real time.
connect(&timer, SIGNAL(timeout()), this, SLOT(update()));
timer.setInterval(0);
timer.start();
Am i missing something ?