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. [solved] Unexpected behaviour for Qt::ItemIsUserCheckable
Forum Updated to NodeBB v4.3 + New Features

[solved] Unexpected behaviour for Qt::ItemIsUserCheckable

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

    Idea is to provide user checkable items in qtableview. I am subclassing from QAbstractTableModel, providing Qt::ItemIsUserCheckable for the appropriate columns in flags function.
    In the data() function , I provide Qt::Checked/Qt::Unchecked for Qt::CheckStateRole.
    In the setData() function, for the role Qt::CheckStateRole i set data as per the value given.

    The behavior is very erratic. Edittriggers even if set to none, editing is possible on single click for checkboxes. And while checking/unchecking them, they toggle twice!! This behavior happens sometimes but occasionally enough to be noticeable. Is there a known bug in this regard?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pkj__
      wrote on last edited by
      #2

      There was a bug, and I introduced it. Qt is alright ;) . Consider this solved.

      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