nextpnr/3rdparty/qtimgui
2021-05-31 16:20:43 +02:00
..
demo-widget add qtimgui renderer library 2018-10-24 19:00:58 +02:00
demo-window add qtimgui renderer library 2018-10-24 19:00:58 +02:00
.gitignore add qtimgui renderer library 2018-10-24 19:00:58 +02:00
ImGuiRenderer.cpp Proper OpenGL limit for QT 2018-10-29 09:34:20 +01:00
ImGuiRenderer.h Proper OpenGL limit for QT 2018-10-29 09:34:20 +01:00
LICENSE add qtimgui renderer library 2018-10-24 19:00:58 +02:00
QtImGui.cpp Fix hidpi, fixes #167, fixes #275, fixes #425 2021-05-31 16:20:43 +02:00
QtImGui.h add qtimgui renderer library 2018-10-24 19:00:58 +02:00
qtimgui.pri add qtimgui renderer library 2018-10-24 19:00:58 +02:00
qtimgui.pro add qtimgui renderer library 2018-10-24 19:00:58 +02:00
README.md add qtimgui renderer library 2018-10-24 19:00:58 +02:00

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.