qtqt4qtplugin

Restrictions in creating a plugin


Recently tried the plugin example of Qt. It didn't work at all and I was confused as to the reason. Then found the solution on one of the forums.

Qt, Application and plugin all three have to be built with the same configuration (Release/Debug)

This works for me as I can build all three in Debug/Release mode. But if I want users to extend my application using plugins I need to provide debug build of my application. (If I provide release build, users will not be able to trouble-shoot the plugin). Qt source is available so it can be built in any mode.

I don't want to provide debug build of my application to users. Is there any work around for this restriction on build mode for plugins?

P.S. I understand users can debug with logging statements, but not sure how many prefer that approach.


Solution

  • This is because Qt has a so called build key which is just a string containing some Qt configuration information, this is documented in the Qt plugin Howto.

    So you should just go ahead and provide a debug build of your application for the best results.