qt輸出支持的數據庫驅動

     程序者,能解決問題,穩定,效率性能兼顧就好。

     在此記錄一點小程序,主要是用於以後調試查找方便。

#include <QApplication>
#include <QDebug>
#include <QtSql/QSqlDatabase>
#include <QSqlDriver>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    qDebug()<<"Available drivers:";
    QStringList drivers=QSqlDatabase::drivers();
    foreach(QString dvr,drivers)
    {
        qDebug()<<dvr;
    }

    return a.exec();
}


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章