123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef DATABASEEVENTTHREAD_H
- #define DATABASEEVENTTHREAD_H
- #include <QThread>
- #include <QDateTime>
- #include <QSqlDatabase>
- #include <QSqlQuery>
- #include <QVariant>
- #include <QStringList>
- class DatabaseEventThread : public QThread
- {
- Q_OBJECT
- public:
- explicit DatabaseEventThread(QObject *parent = nullptr);
- 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 // DATABASEEVENTTHREAD_H
|