Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt Plugins for extending my own Qt Application
pmlit last edited by
Warning ! This is NOT about "writing Qt extensions":http://qt-project.org/doc/qt-5.0/plugins-howto.html#the-higher-level-api-writing-qt-extensions but "extending my own Qt-based Application":http://qt-project.org/doc/qt-5.0/plugins-howto.html#the-lower-level-api-extending-qt-applications.
I have read the whole documentation provided by Qt at the adress above but what I'd like my application to do is very specific and I don't really know how to manage to make it work in a clean way.
I want my QMainWindow, which is opened and shown in the main() function, to contain a QMdiArea and to load plugins.
Plugins must be able to add a QAction in a QMenu from the QMdiArea's menuBar().
When the added action triggers, the plugin opens a QSubWindow in the QMdiArea and the sub-window's code is in the plugin.
Since there must be several plugins for many different sub-windows, but they all do the same (that is to say, add an action in a menu from the menubar() and show them-selves when user triggers the action), I think I must have one single interface to transmit data from and to the mainWindow.
How can I do ?