git submodule update --init --recursive
to ensure that the inner submodule is initialized as well.include(path/to/qtimgui.pri)
to youre .pro
fileQOpenGLWindow
or QOpenGLWidget
and:class DemoWindow : public QOpenGLWindow { protected: void initializeGL() override { QtImGui::initialize(this); } void paintGL() override { // you can do custom GL rendering as well in paintGL QtImGui::newFrame(); ImGui::Text("Hello"); // more widgets... ImGui::Render(); } };
See QOpenGLWidget example and QOpenGLWindow example for details.