mirror of https://github.com/YosysHQ/nextpnr.git
|
|
||
|---|---|---|
| .. | ||
| demo-widget | ||
| demo-window | ||
| .gitignore | ||
| ImGuiRenderer.cpp | ||
| ImGuiRenderer.h | ||
| LICENSE | ||
| QtImGui.cpp | ||
| QtImGui.h | ||
| README.md | ||
| qtimgui.pri | ||
| qtimgui.pro | ||
README.md
QtImGui
Qt (QOpenGLWidget / QOpenGLWindow) backend for ImGui
It enables ImGui to run in QOpenGLWidget / QOpenGLWindow.
How to use
- Add QtImGui sources and headers to your project
- If you are using git submodule, run
git submodule update --init --recursiveto ensure that the inner submodule is initialized as well.
- If you are using git submodule, run
- Add
include(path/to/qtimgui.pri)to youre.profile - Subclass
QOpenGLWindoworQOpenGLWidgetand:
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.
