cyrille
2nd February 2007, 10:13
Hello everyone,
I'm trying to add a QGLWidget inside a QMainWindow, after the first "show()".
The code looks like that :
_window = new QMainWindow;
_ui.setupUi(_window);
createActions();
_window->show();
and inside a slot (when I push a button) :
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
I'm trying to add a QGLWidget inside a QMainWindow, after the first "show()".
The code looks like that :
_window = new QMainWindow;
_ui.setupUi(_window);
createActions();
_window->show();
and inside a slot (when I push a button) :
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