Skip to content

Qt (QOpenGLWidget / QOpenGLWindow) backend for ImGui

License

Notifications You must be signed in to change notification settings

crolando/qtimgui

 
 

Repository files navigation

QtImGui

Qt (QOpenGLWidget / QOpenGLWindow) backend for ImGui

It enables ImGui to run in QOpenGLWidget / QOpenGLWindow.

https://gyazo.com/eb68699c96b9147cca3d5ea9fadfc263

How to use

  • Add QtImGui sources and headers to your project
    • If you are using git submodule, run git submodule update --init --recursive to ensure that the inner submodule is initialized as well.
  • Add include(path/to/qtimgui.pri) to youre .pro file
  • Subclass QOpenGLWindow 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.

About

Qt (QOpenGLWidget / QOpenGLWindow) backend for ImGui

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.8%
  • QMake 2.2%