How to make Qt aware of the QMYSQL driver

后端 未结 7 519
春和景丽
春和景丽 2021-01-12 04:26

I\'m trying to access a MySql database from a Qt application but I get the following error:

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available dr         


        
相关标签:
7条回答
  • 2021-01-12 05:07

    Last time I looked at this you needed to rebuild Qt from source and include the appropriate MySQL source.

    Building Qt from the sources is not hard, it just takes a while. You are likely to have the required tools already.

    A possible workaround may be to access the back-end over ODBC instead.

    0 讨论(0)
提交回复
热议问题