Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QThread vs QTimer for my situation?
Forum Updated to NodeBB v4.3 + New Features

QThread vs QTimer for my situation?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    adviner
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MuldeR
      wrote on last edited by
      #2

      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...

      My OpenSource software at: http://muldersoft.com/

      Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

      Go visit the coop: http://youtu.be/Jay...

      1 Reply Last reply
      0
      • A Offline
        A Offline
        adviner
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved