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. QFileSystemWatcher in Background/Thread
QtWS25 Last Chance

QFileSystemWatcher in Background/Thread

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.1k Views
  • 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.
  • J Offline
    J Offline
    jensen82
    wrote on 4 Jun 2013, 19:25 last edited by
    #1

    Hi!

    I want to create a thread, running in background to poll FileSystemWatcher changes. Is it possible to catch a FileSystemChange in a background-thread? Any Code-Examples?

    Thank you very much!

    1 Reply Last reply
    0
    • D Offline
      D Offline
      donjuedo
      wrote on 4 Jun 2013, 20:00 last edited by
      #2

      A nice alternative on Linux is iNotify. QFileSystemWatcher docs mention overhead, and iNotify seems to run with no impact on my Ubuntu box. YMMV.

      Peter

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tobias.hunger
        wrote on 5 Jun 2013, 10:52 last edited by
        #3

        iNotify is not exactly a cross-platform solution though.

        Did you notice the file "src/corelib/io/qfilesystemwatcher_inotify.cpp" in the qtbase tree? Looks like QFileSystemWatcher will also use inotify;)

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jensen82
          wrote on 11 Jun 2013, 18:04 last edited by
          #4

          So...is it possible in a background thread? A QRunnable or QThread?

          1 Reply Last reply
          0

          1/4

          4 Jun 2013, 19:25

          • Login

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