I am extending a commercial application, running on Windows. It can be extended by plug-ins, which for this application are ordinary DLLs. Free functions exported from plug-in DLLs can be hooked to the host application UI, which forms commands, and these commands can be used based on user interaction with host application UI. Additionally, it looks like the plug-ins run in the same thread as the host application, or at least all the plug-ins run in the same thread.
It is also possible to write user interface for these plug-ins. As host application was ported from another platform, the user interface is using windows as a main container for main window and dialog panels, but the window content and its controls are owner-drawn.
Example plug-ins, shipped with the application, use the old fashioned way of writing Windows user interface - they have a standard resource file, standard window procedure, standard dialog box procedure, standard event loop using GetMessage(), TranslateMessage(), DispatchMessage().
Windows in these example plug-ins are created in one of the plug-in DLL functions. The event loop is also running there.
In those examples it is possible to create modal and modeless windows and the integration seems to be working fine. Just a visual style is 'a bit' mixed.
It is even possible, or better, due to simple example design it is not disallowed to invoke the command multiple times, which opens multiple windows of the same kind and still it looks like everything works.
I would like to use Qt for the UI of my plug-ins. When I do it, however, the host user interface just stops reacting. It is not even repainting.
Initially I used QApplication.exec(), which blocked everything, but soon enough I learned not to call it. Instead I keep the original message loop from the example application and inside it I call QApplication.processEvent(). But it still does not work.
I am wondering, what is happening there, when Qt application behaves so differently? Is Qt blocking some messages or what is going on?
I also tried to integrate the QWinWidget, but it has the similar effect.