QOpenglWidget - Complete Example
-
Hi Guys,
i am working new with QT 5.4 and OpenGL. I want to setup a Dialog from MainWindow and use an widget for OpenGL drawings.
Has some one an Idea how it has to be done??
Thank for your Support.
-
Hi and welcome to devnet,
Do you mean put a QOpenGLWidget in a QDialog ?
-
@SGaist . Thank you,
Yes you are thinking right. I want to integrate an OPENGL-Widget into a Dialog. -
As silly as it may sound, just use the usual technique, put it in a layout in your QDialog like you would for e.g. a QLineEdit
-
@SGaist yes it sounds very simple but i haven't find the right starting Point.
I want to create a OpenGL-class/Dialog for giving out 3d geometies.
Thanks
-
The dialog itself boils down to:
MyDialog::MyDialog(QWidget *parent): :QDialog(parent) ,myGLWidget(new MyGLWidget) { QVBoxLayout *layout = new QVBoxLyout(this); layout->add(myGLWidget); }