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. Set delegate for one cell(item)
Qt 6.11 is out! See what's new in the release blog

Set delegate for one cell(item)

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 5.0k 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.
  • A Offline
    A Offline
    Anticross
    wrote on last edited by
    #1

    I need to set my custom item delegate for only one cell. Is there any way to do this in QTreeView class ? Searching in Assistant gives me only setItemDelegate, setItemDelegateForRow, setItemDelegateForColumn. Function setItemDelegate takes only one argument and applies to all items in view, but I need to apply just in one item by given row and column.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      No, not that I know off. But you could make your delegate just expose the default behaviour for all cells that do not match certain criteria.

      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