QThread vs QTimer for my situation?



  • I have an app that uses qscintilla. I open as many tabs with the editor embedded in it. What i want to do is check if the file was modified outside my app and if it was to notify me if I want to load it (just like any text editor). My question is that I can have several tabs opened and wondering if which one would be better for checking the file for each tab to see if it has been modified outside the app?

    Any thoughts would be appreciated.

    Thanks



  • Have you considered using QFileSystemWatcher ?

    This way you do not need to check the file for modifications periodically, may it be via QThread or QTimer. Instead, just connect to the fileChanged() signal, which will simply be emitted as soon as the file has changed...



  • Thanks I didnt even know about that. I will look into it


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.