csqliteplugin.h cdbinterface.h QtCore QObject QString QSqlDatabase dSQLite/csqliteplugin.cpp cSQLitePlugin #ifndefCSQLITEPLUGIN_H #defineCSQLITEPLUGIN_H #include"cdbinterface.h" #include<QtCore> #include<QObject> #include<QString> #include<QSqlDatabase> classcSQLitePlugin:publicQObject,publiccDBInterface { Q_OBJECT Q_PLUGIN_METADATA(IID"cSQLitePlugin"FILE"dSQLite.json") Q_INTERFACES(cDBInterface) public: qint16pluginAPIVersion(){return(1);} QStringpluginName(){return("SQLiteDB");} qint16pluginVersion(){return(1);} iTypepluginType(){return(cInterface::iTypeDB);} boolconnect(); boolinit(); QStringlastError(); boolconfig(); protected: boolopen(); QSqlDatabasem_db; QStringm_szLastError; }; #endif//CSQLITEPLUGIN_H