Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt and Database driver, linkage?



  • I've been using Qt with a MariaDB database and having gone through the process of building the driver each time there is a version update I decided to build an application that I wouldn't re-compile with each new version, however it occurs to me that I don't know how the database driver is actually used by Qt. I was originally thinking that if I build an executable that the driver will be bound to the exe, but I really don't know.

    Can anyone help me understand this and if the driver is not part of the executable, what is the deployment process for ensuring the driver goes with the executable?


  • Lifetime Qt Champion

    Hi,

    The database drivers are located in the corresponding plugins sub folder. They are not linked to your are application and are expected to be in that sub folder to be correctly found.


  • Lifetime Qt Champion

    Hi,

    The database drivers are located in the corresponding plugins sub folder. They are not linked to your are application and are expected to be in that sub folder to be correctly found.



  • @SGaist , Thank you, I did see that there is also an embedded version of the MySQL driver, which looks like it can be linked in with the application, however external driver is better as I'm intending not to bind to any specific database but keep it as flexible as possible.


Log in to reply