Important: Please read the Qt Code of Conduct -


  • Hi,
    can anybody explain me, why all of the qt3d-Examples are written as a QWindow application.

    Is there a possibilty to use qt3d/OpenGL in a QWidget-Application. With a Widget-area for die OpenGL-Output.

    Thank you for your help!

  • Moderators

    Actually the Qt3D: Basic Shapes C++ Example is a widget application.
    It uses a QWindow container embedded into a widget to display OpenGL context but you could easily switch that to(QOpenGLWidget.
    There are a couple of (non Qt3D) examples of QOpenGLWidget like the Cube OpenGL ES 2.0 Example.

  • Thank you Chris,

    I've tired to play with the "Qt3D: Basic Shapes C++ Example". I put the example in my Mainwidow Environment, an want to replace the main.cpp by the "on_application ..."-routine from the mainwindow program.

    I works but it shows me only a white screen. I checked it serveral times.

    I have no idea what is wrong?