I therefore began to research different ways to accomplish this. Whilst rewriting some of the MFC applications to use Qt, I noticed that Qt only provides QOpenGLWidget, but no QDirect3DWidget. I've been working with both MFC GUI applications as well as Qt in various projects. Game Engine editor using the widget (YouTube playlist): Using the widget with imgui and creating a basic scene: Lastly, giving the application a short delay of 500 milliseconds before accepting the closeEvent. addMSecs( 500) Ĭalling the function event->ignore() at the beginning will postpone the closeEvent allowing for calling the widget's function release. Void MainWindow::closeEvent(QCloseEvent * event) Open MainWindow.h file and create the following Qt slots:
Showing how to integrate and interact with the widget. Under each Direct3D version, there is also the same widget with ImGui integration. Qt custom widgets that you can copy to your projects depending on the Direct3D version you use.
The main directories are source and examples: Directory There are also Direct3D widgets included that support Dear ImGui. This project contains Direct3D widgets that can be used within the Qt Framework for DirectX 9, 10, 11 and 12.