1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00

添加数据库操作的函数

This commit is contained in:
tianduanrui 2018-01-06 16:20:29 +08:00
parent 6fbb8e13fb
commit d5ef41dc62
3 changed files with 9 additions and 1 deletions

View File

@ -54,3 +54,9 @@ void deleteDatabaseConn(QString connectionName)
{
QSqlDatabase::removeDatabase(connectionName);
}
void deleteDatabaseConn(QSqlDatabase &db)
{
QString connectionName = db.connectionName();
deleteDatabaseConn(connectionName);
}

View File

@ -21,7 +21,7 @@ extern "C" {
#endif /* __cplusplus */
#define DB_TYPE "QSQLITE"
#define DB_PATH "./db/"
#define DB_PATH "./db"
#ifdef __cplusplus
}
@ -38,5 +38,6 @@ QQTSHARED_EXPORT void openDatabase(QSqlDatabase& db);
QQTSHARED_EXPORT void closeDatabase(QSqlDatabase& db);
QQTSHARED_EXPORT void deleteDatabaseConn(QString connectionName);
QQTSHARED_EXPORT void deleteDatabaseConn(QSqlDatabase& db);
#endif // QQTSQLDEFINE_H

View File

@ -42,6 +42,7 @@ public:
QQtTableWidget* selectedRows ( int column = 0 );
int pageNum();
int currentPage();
//1-pagenum
void setCurrentPage ( int page );
public slots: