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. "Best" way to tell a view not to update from the model for a known period
Forum Updated to NodeBB v4.3 + New Features

"Best" way to tell a view not to update from the model for a known period

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 287 Views 2 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
    Moschops
    wrote on last edited by Moschops
    #1

    I've got a model that, deep inside, interacts with something that is very much not thread safe. It can go very, very wrong if the view is fetching data while something else is tinkering around in there. Fortunately, I can identify the set of operations that comprise this "tinkering" and thus identify times when the view really should not go asking for data. So I sometimes need to tell the view that displays the data from that model to stop updating, and then return to normal updating.

    I'm sure this is a standard thing, and I can think of a few ways to do it, but what's the conventional "best" way? Ideally, any selection won't be invalidated. I was looking at the various resetModel() and associated functions, but I don't see any explicit guarantees that the view will not ask for any data, so maybe they don't actually stop the view asking for data?

    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