refresh form after adding a widget
Hello everyone,
I'm trying to add a QGLWidget inside a QMainWindow, after the first "show()".
The code looks like that :
Code:
_ui.setupUi(_window);
createActions();
_window->show();
and inside a slot (when I push a button) :
Code:
myGLWidget *glwidget=new myGLWidget(_ui.centralwidget);
glwidget
->setGeometry
(QRect(20,
200,
660,
680));
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
Re: refresh form after adding a widget
Yes, call show() on the gl widget just like you did for the main window.
Re: refresh form after adding a widget
Thanks a lot, ... I thought I already tried "show()" and that's why I posted here.
Well it works anyway, thank you again!