Files
FluentUI/example/src/component/FileWatcher.h
2024-06-28 17:09:23 +08:00

21 lines
365 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;
};