Files
FluentUI/example/src/component/FileWatcher.h
朱子楚\zhuzi 3f6ef13cd0 update
2024-04-11 15:09:47 +08:00

22 lines
359 B
C++

#pragma once
#include <QObject>
#include <QFileSystemWatcher>
#include <QtQml/qqml.h>
#include "src/stdafx.h"
class FileWatcher : public QObject {
Q_OBJECT
Q_PROPERTY_AUTO(QString, path);
public:
explicit FileWatcher(QObject *parent = nullptr);
Q_SIGNAL void fileChanged();
private:
void clean();
private:
QFileSystemWatcher _watcher;
};