简体   繁体   中英

QMYSQL driver not loaded (Openserver)

I'm trying to add my database to a QT-project. However, it gives the error "QMYSQL driver not loaded". I use openserver to work with mysql.

  1. I created an instance of QSqlDatabase.
  2. I entered host name, database name, port, user name and password.
  3. I add sql to.pro file.
  4. I added bin and lib of MySql to path.

! 主窗口.cpp 。轮廓 mysql屏幕 。小路

if you don't have any experience with compiling, take a look here:

https://github.com/thecodemonkey86/qt_mysql_driver/releases

you must then copy the files into your qt/mingw/bin folder. the versions must match

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM