summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tutorials/modelview/1_readonly/mymodel.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-13 01:00:13 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-11-13 01:00:13 +0100
commit0441d959ff87431ab432ce0c30bbb857a631742e (patch)
tree25c6c4293f74e39b9d4cf45b15957f233cffa9c5 /examples/widgets/tutorials/modelview/1_readonly/mymodel.cpp
parentae0dd3201bc13b81c62752bb04e42362c78bfe16 (diff)
parent8c685b765bf4ceba3c4cf8fdd9c9d680f338b7a9 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'examples/widgets/tutorials/modelview/1_readonly/mymodel.cpp')
-rw-r--r--examples/widgets/tutorials/modelview/1_readonly/mymodel.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/widgets/tutorials/modelview/1_readonly/mymodel.cpp b/examples/widgets/tutorials/modelview/1_readonly/mymodel.cpp
index 82ec53c665..2b36565bc6 100644
--- a/examples/widgets/tutorials/modelview/1_readonly/mymodel.cpp
+++ b/examples/widgets/tutorials/modelview/1_readonly/mymodel.cpp
@@ -53,7 +53,7 @@
#include "mymodel.h"
MyModel::MyModel(QObject *parent)
- :QAbstractTableModel(parent)
+ : QAbstractTableModel(parent)
{
}
@@ -70,11 +70,10 @@ int MyModel::columnCount(const QModelIndex & /*parent*/) const
QVariant MyModel::data(const QModelIndex &index, int role) const
{
if (role == Qt::DisplayRole)
- {
return QString("Row%1, Column%2")
.arg(index.row() + 1)
.arg(index.column() +1);
- }
+
return QVariant();
}
//! [Quoting ModelView Tutorial]