summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tutorials/modelview/3_changingmodel/mymodel.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-08-08 11:29:22 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-08-09 00:19:09 +0200
commit8751ca3daeaa2a500a37b070cdcce5a5bb7a165f (patch)
tree9fad975920f4ffd692c83ecc33d3d06d1e86a74c /examples/widgets/tutorials/modelview/3_changingmodel/mymodel.cpp
parent4ba4c4f07cf678087abd6ecbed8ffc5fd558bee8 (diff)
Polish the model/view tutorial examples
- Reorder the class declarations, moving private sections last - Make constructors explicit - Add space to the comments - Introduce auto - Replace slot MainWindow::showWindowTitle() by a direct connection to slot QWidget::setWindowTitle(). Pick-to: 6.4 6.3 Change-Id: Ic229162434dfef5f2767d0b4e186759ca0f821f3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'examples/widgets/tutorials/modelview/3_changingmodel/mymodel.cpp')
-rw-r--r--examples/widgets/tutorials/modelview/3_changingmodel/mymodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/tutorials/modelview/3_changingmodel/mymodel.cpp b/examples/widgets/tutorials/modelview/3_changingmodel/mymodel.cpp
index 82ba17dc45..5ce56632ff 100644
--- a/examples/widgets/tutorials/modelview/3_changingmodel/mymodel.cpp
+++ b/examples/widgets/tutorials/modelview/3_changingmodel/mymodel.cpp
@@ -44,9 +44,9 @@ QVariant MyModel::data(const QModelIndex &index, int role) const
//! [quoting mymodel_b ]
void MyModel::timerHit()
{
- //we identify the top left cell
+ // we identify the top left cell
QModelIndex topLeft = createIndex(0,0);
- //emit a signal to make the view reread identified data
+ // emit a signal to make the view reread identified data
emit dataChanged(topLeft, topLeft, {Qt::DisplayRole});
}
//! [quoting mymodel_b ]