Home > Database > Mysql Tutorial > body text

qt-Qt 5.3.2不能链接mysql

WBOY
Release: 2016-06-06 09:44:09
Original
1064 people have browsed it

mysqlqt

从qt5.2开始,qt版本应该是自带了qt链接mysql的驱动的,但是我这儿就出现问题了。。加载失败,但是如果加载QSQLITE的驱动是能成功的。。

实验代码如下:
#include
#include
#include

int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);

<code>qDebug() </code>
Copy after login

}

实验输出结果如下:
Available database is:
"QSQLITE" "QMYSQL" "QMYSQL3" "QODBC" "QODBC3" "QPSQL" "QPSQL7"

QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7
mysql db is avaliable? false
请各位大大指点一二。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!