views:

78

answers:

2

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.

+1  A: 

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.

Patrice Bernassola
The Qt documentation for Qt 3.3 referenced some classes for creating netscape plugins in Qt 3.3 :- http://doc.trolltech.com/3.3/netscape-plugin.htmlThis stuff seems to have gone "missing" in 4.6 :-(
Chris Becke
A: 

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