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. CheckBox in QAbstractItemModel while using QStyledItemDelegate in the view
Forum Update on Tuesday, May 27th 2025

CheckBox in QAbstractItemModel while using QStyledItemDelegate in the view

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 862 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.
  • F Offline
    F Offline
    farcat
    wrote on 28 Sept 2014, 17:40 last edited by
    #1

    I might be missing something obvious, but i have the following problem:

    I am using QStyledItemDelegate to make treeview cells editable. Sometimes the field to edit is boolean and i use a QCheckBox. I also use the CheckStateRole in the QAbstractItemModel to show a checkbox when not editing.

    What happens is that when not editing everything is fine, but when editing the editable checkbox is placed next to the QAbstractItemModel checkbox, instead of replacing it or painting over it or whatever. I's like to use the delegate for editing of the checkbox for consistency sake.

    I would like to solve this elegantly, if possible, not make an exception only for boolean values.

    Cheers, Lars

    1 Reply Last reply
    0

    1/1

    28 Sept 2014, 17:40

    • Login

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