Quote Originally Posted by aamer4yu View Post
So what are u gonna do even if u get the rectangle of the checkbox ??

or does QStandardItem::setCheckable(bool) solve ur prob ?
Qt Code:
  1. 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
Qt Code:
  1. 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.