summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tutorials/modelview/1_readonly/mymodel.cpp
diff options
context:
space:
mode:
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]