Reputation: 6171
While studying the Plug & Paint Example I've noted there is no QPLUGIN
in the plugandpaint.pro file.
In the Static Plugins section of the "How to Create Qt Plugins", I read "To link plugins statically, you need to add the required plugins to your build using QTPLUGIN."
So, what's going on here?
Experimentally, I commented Q_IMPORT_PLUGIN(BasicToolsPlugin)
in the main.cpp and added QTPLUGIN += pnp_basictools
to the .pro file, as a result no plugins where loaded.
Upvotes: 1
Views: 1781
Reputation: 5472
The documentation seems to be a bit misleading. This is my understanding of the QTPLUGIN
qmake parameter:
QTPLUGIN
can be used to specify a list of names of Qt platform plugins that are to be linked with an application when linking against static build of Qt. Examples of such plugins are image formats like qgif, qjpeg, qsvg, database support like qsqlite, qsqloci, qsqlpsql, some language codecs.
The variable has no effect when linking against a dynamic build of Qt.
Upvotes: 1