QTableWidget* table = new QTableWidget();table->setCellWidget(i, j, new QCheckBox());
C++ (Qt)QStandardItemModel* sm = qobject_cast< QStandardItemModel* >( table_view->model() );QModelIndex mi = sm->index( row, column );QStandardItem* item = sm->itemFromIndex( mi );item->setFlags( item->flags() | Qt::ItemIsUserCheckable );sm->setData( mi, is_checked ? Qt::Checked : Qt::Unchecked, Qt::CheckStateRole );