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. QTableView: Cells value gets cleared when editing
Forum Updated to NodeBB v4.3 + New Features

QTableView: Cells value gets cleared when editing

Scheduled Pinned Locked Moved Solved General and Desktop
qtableviewqt5.9qtableview c++
2 Posts 2 Posters 1.5k 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
    mapuna
    wrote on last edited by mapuna
    #1

    I am using a QTableView with Custome Model and delegates, I have the following issue:

    • I am not able to edit a cell , when the data from backened is refreshing the view very fast, during editing the cell keeps on refeshing as the speed of data from backened is fast not allowing me to edit from UI
    • But if somehow I stop the udpates for a while I am allowed to do normal Editing in cell

    Please advise how can we :

    • Disable the cell/row from being updated when the user is performing the edit on the cell

    Relevant Question on StackoverFlow:

    • https://stackoverflow.com/questions/46804806/qtableview-cell-contents-are-cleared-during-editing
    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      The answer in stackoverflow is correct.

      Is there no other way to get notified when an Edit begins?

      just declare and emit your custom signal in the delegate subclass

      Remember 1 model can service multiple views so, normally, the model should not depend on the state of the view or delegate

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved