Search code examples
qtpluginscross-platformqtplugin

QT for cross platform plugin development?


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.


Solution

  • 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.