42 const QItemSelection &deselected)
44 QModelIndexList items = selected.indexes();
46 for (
const QModelIndex &index : std::as_const(items)) {
47 QString text = QString(
"(%1,%2)").arg(index.row()).arg(index.column());
48 model->setData(index, text);
54 items = deselected.indexes();
56 for (
const QModelIndex &index : std::as_const(items)) {
57 model->setData(index, QString());
MainWindow(QWidget *parent=nullptr)
void changeCurrent(const QModelIndex ¤t, const QModelIndex &previous)
[2]
void updateSelection(const QItemSelection &selected, const QItemSelection &deselected)
[0]