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. Last modified date is not reflecting instantly
Qt 6.11 is out! See what's new in the release blog

Last modified date is not reflecting instantly

Scheduled Pinned Locked Moved General and Desktop
qfileqt 5.4.1
2 Posts 2 Posters 1.8k 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.
  • ankit thakarA Offline
    ankit thakarA Offline
    ankit thakar
    wrote on last edited by
    #1

    Hello,
    I have implemented simple tree view in which i want to show file_name and its last modified date (2 columns). tree view has also add and remove button to add or remove files from tree view. now the problem is that when i add any file and if i will modify that file externally (like from text editor something like that) then it is not instantly showing me last modified date in tree view.

    I have to close my application and then again after reopening it, it showing me my changes
    I have used QDateTime lastModified() function for that?
    What changes should i implement so that it will change instantly?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alearner
      wrote on last edited by alearner
      #2

      why not try

      QFileSystemWatcher
      

      connect its signal to your model's slot.

      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