Qt Code:
// initialize a checkable item item->setFlags(item->flags() | Qt::ItemIsUserCheckable); item->setCheckState(Qt::Unchecked);To copy to clipboard, switch view to plain text mode
To react to check state changes, connect to signal QTableWidget::itemChanged(). This signal is emitted whenever the data of an item has changed. The corresponding item is passed as a parameter. Check it's check state and do corresponding actions. Just be aware that the signal is emitted whenever any data of the items changes, it has not necessarily been a change of the check state.
QTableWidget nor any QAbstractItemView descendant class offers any signal which would inform only check state changes. To only react to check state changes, Trolltech suggests you to reimplement QTableWidgetItem::setData().
PS. once again this has nothing to do with Qt Designer which is a tool for designing and building graphical user interfaces.
Bookmarks