mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
添加数据库操作的函数
This commit is contained in:
parent
6fbb8e13fb
commit
d5ef41dc62
@ -54,3 +54,9 @@ void deleteDatabaseConn(QString connectionName)
|
||||
{
|
||||
QSqlDatabase::removeDatabase(connectionName);
|
||||
}
|
||||
|
||||
void deleteDatabaseConn(QSqlDatabase &db)
|
||||
{
|
||||
QString connectionName = db.connectionName();
|
||||
deleteDatabaseConn(connectionName);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
QQtTableWidget* selectedRows ( int column = 0 );
|
||||
int pageNum();
|
||||
int currentPage();
|
||||
//1-pagenum
|
||||
void setCurrentPage ( int page );
|
||||
|
||||
public slots:
|
||||
|
Loading…
x
Reference in New Issue
Block a user