Qtimgui
Qt (QOpenGLWidget / QOpenGLWindow) backend for ImGui
Install / Use
/learn @seanchas116/QtimguiREADME
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
- CMake:
- Add
add_subdirectory(path/to/qtimgui)to yourCMakeLists.txtfile - Link
qt_imgui_quick(for Qt Quick apps or apps that don't use QOpenGLWidget) orqt_imgui_widget(for apps using QOpenGLWidget)
- Add
- qmake:
- Add
include(path/to/qtimgui/qtimgui.pri)to your.profile
- Add
- 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();
QtImGui::render();
}
};
See QOpenGLWidget example and QOpenGLWindow example for details.
Specific notes for Android, when using cmake
Two projects are provided: qtimgui.pro and CMakeLists.txt.
When using CMake under Android, this project will uses qt-android-cmake, which is a CMake utility for building and deploying Qt based applications on Android without Qt Creator.
In order to successfuly deploy the app to a device, the cmake variable ANDROID_NATIVE_API_LEVEL should elevated to 21 or 26 (depending on the native levels installed in your android sdk)
You will need to set it via the CMake command line, or inside Qt Creator (in the project view).
Related Skills
node-connect
342.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.7kCommit, push, and open a PR

