You don't have to hard code the path to the plugins. It is enough if you put the MySQL plugin at

your_app/sqldrivers

Qt will then find it by it's own. Also if you need to hard code any path at all, better use qt.conf instead of compiling the path in your application.