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. QTreeView CustomDelegate set by setItemDelegateForRow stays with row index

QTreeView CustomDelegate set by setItemDelegateForRow stays with row index

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtreeviewcustomdelegate
3 Posts 3 Posters 150 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.
  • G Offline
    G Offline
    gary-1959
    wrote on last edited by
    #1
    This post is deleted!
    Pl45m4P 1 Reply Last reply
    0
    • G gary-1959

      This post is deleted!

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @gary-1959 said in QTreeView CustomDelegate set by setItemDelegateForRow stays with row index:

      setItemDelegateForRow
      

      Is there a way to set a CustomDelegate which will stay connected to the row item

      So you enable your custom delegate for, say, row 3, then remove rows 1-2. After that your delegate for row 3 should be in row 1?!
      I don't think that this is standard behavior, therefore you have to keep track on insertations and deletion yourself and handle them as desired.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

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

        ... or check inside the delegate functions if the row is still the one e.g. by checking the data to display.

        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
        1

        • Login

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