123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef DATABASETHREAD_H
- #define DATABASETHREAD_H
- #include <QThread>
- #include <QDateTime>
- #include <QSqlDatabase>
- #include <QSqlQuery>
- #include <QVariant>
- #include <QStringList>
- class DatabaseThread : public QThread
- {
- Q_OBJECT
- public:
- explicit DatabaseThread(QObject *parent,QSqlDatabase *db);
- void run();
- void stop();
- void appendSql(QString sql);
- signals:
- void dbdata_log(QString log);
- public slots:
- private:
- int hour;
- bool keep;
- QSqlDatabase *Db;
- QStringList sqlList;
- };
- #endif // DATABASETHREAD_H
|