Questions tagged [qfilesystemwatcher]
A QFileSystemWatcher is a class from the Qt toolkit which provides an interface for monitoring files and directories for modifications.
qfilesystemwatcher
44
questions
0
votes
0
answers
250
views
How to use QFileSystemWatcher
I'd like to detect when a SDCARD or USB is inserted in my QT based linux embedded System. I made the following, but I think something is missing:
FSwatcher = new QFileSystemWatcher(this);
...
1
vote
1
answer
211
views
QFileSystemModel doesn't emit fileRenamed signal
I am trying to watch the changes in a directory using QFileSystemModel. Whenever I rename a file in the root path, only the directoryLoaded() signal is emitted. I want the fileRenamed() signal to be ...
0
votes
1
answer
227
views
QFileSystemWatcher file changed signal emits only ones for few file update
I am using QFileSystemWatcher to control the log file changes.
For creating and updating the log file I am using boost library.
When I log few messages in one method file changing signal emits only ...
0
votes
0
answers
266
views
Qt 4.7 QFileSystemWatcher example
i want to observe a path with the QFileSystemWatcher in QT 4.7. In QT 5.x work my program, but I don't know why it don't work in QT 4.7.
QT 5.x
QFileSystemWatcher watcher;
watcher.addPath("myPath&...
0
votes
1
answer
378
views
Why does QFileSystemWatcher emit multiple signals? and QFileInfo for the first time writes a zero file size
When a file is changed, the signal should fire 1 time, but for me it works several times.
In setings function, I request size and it prints
parser::parser(QObject *parent) : QObject(parent)
{
...
1
vote
1
answer
864
views
Qt: Catch external changes on an SQLite database
)
I'm deveoping a program using an SQLite database I acces via QSqlDatabase. I'd like to handle the (hopefully rare) case when some changes are done to the database which are not caused by the ...
1
vote
1
answer
2k
views
How to update file info in a QFileSystemModel?
First of all, this question is similar to this other one QFileSystemModel not updating when files change with the main difference than in this case I don't want to replace the entire model each time ...
0
votes
1
answer
491
views
Cannot connect QFileSystemWatcher::directoryChanged to a lambda
As the title says, I'm trying to connect the QFileSystemWatcher::directoryChanged(const QString&) signal to a lambda, but when I compile it with g++ (7.2.1), I get the following error (abbreviated ...
0
votes
0
answers
681
views
QFileSystemWatcher directoryChanged signal emitted twice when file is deleted
I've some code to monitor a folder containing .xml files.
I used a QFileSystemWatcher and connected the signal directoryChanged(const QString &path) to a slot where I implemented a small routine.
...
0
votes
2
answers
1k
views
using QFileSystemWatcher::Files() to get file count of watched folder example? count is always 0?
I have tried to figure this out over the weekend, but to no avail. I cant seem to find an example using QFileSystemWatcher::Files() directly so i thought i would ask.
I have a program that :
lets ...
0
votes
0
answers
1k
views
Files not accessible in QFileSystemWatcher callback on Android
I created a simple watcher and added a path to it. I connected the watcher's signal to my method:
void CssSetter::watchIfNeeded(const QString& newPath)
{
if(watcher==nullptr) {
watcher =...
3
votes
2
answers
1k
views
QFileSystemWatcher: Detect if file has been flushed
I have a QT app that needs to know when new data is available in a specific file. So I used QFileSystemWatcher and connected the fileChanged signal to a function that will send a message in case of ...
0
votes
1
answer
3k
views
PyQt, QFileSystemWatcher doesn't capture the file added
I need to monitor a certain folder and find out whether a new file is added to the folder, after that I ask the user whether they want to print the file out or not. The problem lies with the ...
2
votes
0
answers
982
views
Qt device watcher?
Because of the problem I am experiencing described here Cannot use keyboard within Qt app without sudo and here Qt embedded linux event watcher I was wondering either there is in Qt, an event watcher? ...
1
vote
1
answer
878
views
QFileSystemWatcher error handling with PySide/PyQt - Python 3.x
My program utilises Qt's QFileSystemWatcher function to monitor a network directory (not on the local machine itself) for changes, and then run a script when a change is found. This function performs ...