This is an informative post to indicate how I finally got a plugin to work, in particular the MySQL plugin.

QT says it looks through the library paths for plugins. It also says that the application directory is also added to the library paths. This is however a bit misleading. When it scans for plugins it looks to specific subdirectories in those paths. For example, when looking for SQL driver plugins it is hard-coded to look in the "sqldrivers" subdirectory.

So this setup will work:

your_app
your_app/plugins
your_app/plugins/sqldrivers

And then you need to addLibraryPath( "/fullpath/your_app/plugins" ).

Windows
To got further however something like the mysql plugin will need libmysql.dll. This will only be searched in the application path and the standard system paths -- this has nothing to do with the library paths in this case. So in the above you need to place this file in the "your_app" directory.

QT_DEBUG_PLUGINS
This environment variable yields a bit of useful information. On windows to get it working you're best setting it in the global environment variable settings -- I had difficulty getting it working if just set in a command prompt. The output goes to the installed MsgHandler.