Hello everyone,

I'm trying to add a QGLWidget inside a QMainWindow, after the first "show()".

The code looks like that :

Qt Code:
  1. _window = new QMainWindow;
  2. _ui.setupUi(_window);
  3. createActions();
  4. _window->show();
To copy to clipboard, switch view to plain text mode 

and inside a slot (when I push a button) :

Qt Code:
  1. myGLWidget *glwidget=new myGLWidget(_ui.centralwidget);
  2. glwidget->setGeometry(QRect(20, 200, 660, 680));
To copy to clipboard, switch view to plain text mode 

when, I put the myGLWidget before _window->show(), the widget is displayed, but, when inside the slot, it is like nothing appened...

-> Is there a method (show, refresh, update.. ?) to force my QGLWidget to show itself?

Cyrille