
Originally Posted by
aamer4yu
So what are u gonna do even if u get the rectangle of the checkbox ??
or does QStandardItem::setCheckable(bool) solve ur prob ?
QStandardItem::setCheckable(bool)
To copy to clipboard, switch view to plain text mode
can put a check box in the view's item. i can check or uncheck the checkbox by clicking it, however, i want to check or uncheck the checkbox by clicking any position of the item, including the checkbox. so I reimplement
QTableView::mouseReleaseEvent(QEvent *event)
To copy to clipboard, switch view to plain text mode
, and have to judge whether the mouse event position is inside or outside the check box,
in one word: i need different operations when mouse event happens inside and outside the checkbox, so i have to know the checkbox's rect.
Bookmarks