[solved] Unexpected behaviour for Qt::ItemIsUserCheckable



  • 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?



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.