I have a pre-existing application, that calls out into a plugin library. I want the plugin library to be developed in Qt, and to be able to display a Qt UI.
However, when I attempt to create a QWidget
it complains that the QApplication
needs to be created first.
Is it not possible to use Qt to develop cross platform plugins?
E.开发者_运维百科g. a netscape plugin for Chrome or Firefox. I do not, and cannot, control the app's main loop.As explain in the Qt documentation, any GUI application using Qt needs a QApplication
to be created into main thread since it is containing all signal engine and event loop.
There is Qt/MFC Migration Framework that can help you to build plugins if the main application where the plugin is laoded is Win32 or Mfc. Qt/MFC Migration Framework
精彩评论