summaryrefslogtreecommitdiffstats
path: root/examples/widgets/itemviews
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/itemviews')
-rw-r--r--examples/widgets/itemviews/editabletreemodel/treemodel.cpp2
-rw-r--r--examples/widgets/itemviews/interview/model.cpp2
-rw-r--r--examples/widgets/itemviews/puzzle/piecesmodel.cpp2
-rw-r--r--examples/widgets/itemviews/simpledommodel/dommodel.cpp2
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treemodel.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/examples/widgets/itemviews/editabletreemodel/treemodel.cpp b/examples/widgets/itemviews/editabletreemodel/treemodel.cpp
index 4eb2abdd6f..f3f961e59e 100644
--- a/examples/widgets/itemviews/editabletreemodel/treemodel.cpp
+++ b/examples/widgets/itemviews/editabletreemodel/treemodel.cpp
@@ -89,7 +89,7 @@ Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const
if (!index.isValid())
return 0;
- return Qt::ItemIsEditable | Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+ return Qt::ItemIsEditable | QAbstractItemModel::flags(index);
}
//! [3]
diff --git a/examples/widgets/itemviews/interview/model.cpp b/examples/widgets/itemviews/interview/model.cpp
index e99eb477fb..aaecc72b32 100644
--- a/examples/widgets/itemviews/interview/model.cpp
+++ b/examples/widgets/itemviews/interview/model.cpp
@@ -125,7 +125,7 @@ Qt::ItemFlags Model::flags(const QModelIndex &index) const
{
if (!index.isValid())
return 0;
- return (Qt::ItemIsDragEnabled|Qt::ItemIsSelectable|Qt::ItemIsEnabled);
+ return Qt::ItemIsDragEnabled|QAbstractItemModel::flags(index);
}
Model::Node *Model::node(int row, Node *parent) const
diff --git a/examples/widgets/itemviews/puzzle/piecesmodel.cpp b/examples/widgets/itemviews/puzzle/piecesmodel.cpp
index 29ce9c8ea5..c7ff78a049 100644
--- a/examples/widgets/itemviews/puzzle/piecesmodel.cpp
+++ b/examples/widgets/itemviews/puzzle/piecesmodel.cpp
@@ -81,7 +81,7 @@ void PiecesModel::addPiece(const QPixmap &pixmap, const QPoint &location)
Qt::ItemFlags PiecesModel::flags(const QModelIndex &index) const
{
if (index.isValid())
- return (Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled);
+ return (QAbstractListModel::flags(index)|Qt::ItemIsDragEnabled);
return Qt::ItemIsDropEnabled;
}
diff --git a/examples/widgets/itemviews/simpledommodel/dommodel.cpp b/examples/widgets/itemviews/simpledommodel/dommodel.cpp
index cf43ebdf3c..7280466ad1 100644
--- a/examples/widgets/itemviews/simpledommodel/dommodel.cpp
+++ b/examples/widgets/itemviews/simpledommodel/dommodel.cpp
@@ -105,7 +105,7 @@ Qt::ItemFlags DomModel::flags(const QModelIndex &index) const
if (!index.isValid())
return 0;
- return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+ return QAbstractItemModel::flags(index);
}
//! [5]
diff --git a/examples/widgets/itemviews/simpletreemodel/treemodel.cpp b/examples/widgets/itemviews/simpletreemodel/treemodel.cpp
index 363aa0593a..0eef22d45b 100644
--- a/examples/widgets/itemviews/simpletreemodel/treemodel.cpp
+++ b/examples/widgets/itemviews/simpletreemodel/treemodel.cpp
@@ -99,7 +99,7 @@ Qt::ItemFlags TreeModel::flags(const QModelIndex &index) const
if (!index.isValid())
return 0;
- return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+ return QAbstractItemModel::flags(index);
}
//! [4]