I build Qt with:
configure -static -platform win32-msvc2012 -qt-sql-mysql -plugin-sql-mysql -no-angle -no-icu -opengl desktop -nomake demos -nomake examples
and now i’m trying to build the most simple program in Qt which will only print available sql plugins. I have no idea why, but this code:
#include "mainwindow.h"
#include <QApplication>
#include <QtSql/QSqlDatabase>
#include <QMessageBox>
#include <QStringList>
#pragma comment(lib, "Qt5Sql.lib")
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QStringList lista = QSqlDatabase::drivers();
for(int i = 0; i < lista.length(); ++i)
QMessageBox::information(NULL, "asd", QApplication::tr("%1").arg(lista[i]));
MainWindow w;
w.show();
return a.exec();
}
pro file:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = jakistam
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
shows only qsqlite as available plugin. Of course in qtbase/plugins/sqldrivers i have got mysql libs. Any ideas what is going on?
↧