Try this:
#include <QCoreApplication>
#include <QSqlDatabase>
#include <QStringList>
#include <QtDebug>
int main( int argc, char **argv )
{
}
#include <QCoreApplication>
#include <QSqlDatabase>
#include <QStringList>
#include <QtDebug>
int main( int argc, char **argv )
{
QCoreApplication app( argc, argv );
qDebug() << QSqlDatabase::drivers();
}
To copy to clipboard, switch view to plain text mode
it should print all available drivers (don't forget about QT += sql).
Make sure you create QCoreApplication or QApplication instance before you try to connect to the database.
Bookmarks