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. QAbstractItemModel flag signaling?
QtWS25 Last Chance

QAbstractItemModel flag signaling?

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

    I have a model that has the ItemIsEnabled and ItemIsSelectable flags disabled until network data comes in about the node in the model, at which point ItemIsEnabled and ItemIsSelectable become enabled. This works... kinda... the view does not update the flags (data gets updated properly via dataChanged in the model) until I try to click on it. It remains looking disabled until I try to click on it, giving me no indication of whether the data has arrived or not. Looking through the docs, I see no signaling for flags. How can I tell my view that a given QModelIndex has updated its flags so it can update its appearance properly? Is there a role value in the dataChanged() signal?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @kshots said in QAbstractItemModel flag signaling?:

      (data gets updated properly via dataChanged in the model)

      Please show us some code, I would guess it's not the case here. Best would be a minimal, compilable example (should not be hard here)

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      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