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. Q 4.8.6 - Model/view: how to update a full column inside a QTreeView / model
Forum Updated to NodeBB v4.3 + New Features

Q 4.8.6 - Model/view: how to update a full column inside a QTreeView / model

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 470 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.
  • M Offline
    M Offline
    ml71
    wrote on last edited by
    #1

    Assuming I am displaying a QFileSystemModel inside a QTreeView with an intermediate QSortFilterProxyModel (select only my files for example). In particular, one column is displaying the last modified date of each file.
    Now for one reason or another I know that many of the underlying files are going to be modified in batch (no renaming, just an update of the content or the date of last modification).
    I like to say that the date of modifications of all the files have been updated.
    However, I do not really want to trigger a full refresh nor to emit a dataChanged(QModelIndex, QModelIndex) signal for each individual file (or each folder).
    What is the recommended solution in such a case?
    Thanks.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Tschikkn
      wrote on last edited by
      #2

      Hi!

      Why not emit the dataChanged-Signal after finishing your batch-modify-routine?
      Normally I would expect that every change will be emitted, but if you are not writing a new file browser, you may just limit it until your batch has been finished.

      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