qt 5.8 sql connection error:QMYSQL driver not loaded on windows 10

后端 未结 5 942
别跟我提以往
别跟我提以往 2020-12-06 19:24

When i tried to connect to mysql, there is a error:

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODB         


        
5条回答
  •  佛祖请我去吃肉
    2020-12-06 19:42

    1. You must rebuild mysql driver.
    2. Follow this guide

      Note: you need 3 things:

      a. qt-opensource-xxx-mingw492-xxx.exe for Qt Creator and Qt command Prompt.

      b.qt-everywhere-opensource-src-xxx.zip for Qt source code, needed for mysql.pro file. c.mysql-connector-c-6.1.10-win32.zip needed for lib and include folder.

提交回复
热议问题