QOpenglWidget - Complete Example
General and Desktop
6
Posts
2
Posters
2.3k
Views
2
Watching
-
wrote on 25 Apr 2015, 16:33 last edited by
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 ?
-
Hi and welcome to devnet,
Do you mean put a QOpenGLWidget in a QDialog ?
-
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
-
Hi and welcome to devnet,
Do you mean put a QOpenGLWidget in a QDialog ?
-
The dialog itself boils down to:
MyDialog::MyDialog(QWidget *parent): :QDialog(parent) ,myGLWidget(new MyGLWidget) { QVBoxLayout *layout = new QVBoxLyout(this); layout->add(myGLWidget); }
5/6