Qt 3D Display
I am trying to understand the display component of Qt 3D. All of the examples use Qt3DExtras::Qt3DWindow which appears to open an independent window, a subclass of QWindow, from a console application. What if I want to create a 3D application where there might be one or more 3D windows embedded in a UI with pushbuttons and other controls. Is there a widget for that? There is an QOpenGLWidget, but it does not seem to be integrated with Qt 3D or am I missing something?
I hope it is as simple as using QtCreator to creat the UI and place a QWidget were I want the Qt 3D to be and promote the QWidget to a Qt3DExtras::Qt3DWindow. Are there any C++ examples resembling what I want?
Hi! The easiest way for now is wrapping a Qt3DWindow into a QWidget using
Qt3DExtras::Qt3DWindow *my3dwindow = new Qt3DExtras::Qt3DWindow(); QWidget *my3dwidget = QWidget::createWindowContainer(window);
An example for this can be found here.
@Wieland Thank you very much. It is exactly what I was looking for. I have been combing through the Qt 3D documentation but did not run across this.
@ofmrew Yea, the state of the 3D docs is still... well, let's call it "beta" ;-)