In general if your data processing can take longer than a second, you should probably not be doing it on the main thread in order to avoid non-responsive GUI.
Furthermore, when working on folder monitoring in Windows, I observed that the Windows file-monitoring mechanism will start dropping events if the monitoring thread is busy processing data. So that's another good reason to move data processing to it's own thread.
The approach I've taken before was to create a data processing QObject
, "move" it to a new thread (using QObject::moveToThread(...)
) and connecting it to the filesystem monitor and the GUI using signals and slots.
To be entirely honest, I did not use Qt's filesystem monitoring because I needed more info than Qt provides for file rename events. So I had to use the Windows filesystem monitoring API directly. But I don't think Qt can work around limitations in the OS in terms of processing large-scale changes.