You don't have to call exec(). It's enough to create the application instance as it is the one loading database drivers.