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. How check status of files in a single directory?
Qt 6.11 is out! See what's new in the release blog

How check status of files in a single directory?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 641 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.
  • B Offline
    B Offline
    Ballaz995
    wrote on last edited by
    #1

    Hi,
    I never use Qt before it. My main aim is to create a widget that shows the status of files (created, deleted or edited), notifying the change of them every three seconds, in a default directory.
    Someone could help me? I have no idea how start it.

    raven-worxR JonBJ 2 Replies Last reply
    0
    • B Ballaz995

      Hi,
      I never use Qt before it. My main aim is to create a widget that shows the status of files (created, deleted or edited), notifying the change of them every three seconds, in a default directory.
      Someone could help me? I have no idea how start it.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Ballaz995
      Instead of polling every 3 seconds you could use QFileSystemWatcher on a specified path.
      Then you will get a fileChanged signal from it.

      The passed filePath parameter then can be inspected using QFileInfo (see it's birthTime(), lastModified(), etc. methods)

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      4
      • B Ballaz995

        Hi,
        I never use Qt before it. My main aim is to create a widget that shows the status of files (created, deleted or edited), notifying the change of them every three seconds, in a default directory.
        Someone could help me? I have no idea how start it.

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @Ballaz995
        You should follow @raven-worx 's suggestion, unless the directory of your files can be on a network rather than local?

        B 1 Reply Last reply
        0
        • JonBJ JonB

          @Ballaz995
          You should follow @raven-worx 's suggestion, unless the directory of your files can be on a network rather than local?

          B Offline
          B Offline
          Ballaz995
          wrote on last edited by Ballaz995
          #4

          @JonB my directory is local
          @raven-worx thx, now i will try it.

          I'm new user and can t replay to two message

          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