From 5a9de4c6768e413a56f0e7b6c67ea11db761cd58 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 26 Nov 2012 14:27:37 +0100 Subject: Always use QAIM to get the default flags. Change-Id: I801f5c8023e3e3672fde28139a7f34f640e650f5 Reviewed-by: Lars Knoll --- examples/widgets/tutorials/modelview/5_edit/mymodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/widgets/tutorials/modelview/5_edit/mymodel.cpp') diff --git a/examples/widgets/tutorials/modelview/5_edit/mymodel.cpp b/examples/widgets/tutorials/modelview/5_edit/mymodel.cpp index f64e0d563a..7792c1cc2b 100644 --- a/examples/widgets/tutorials/modelview/5_edit/mymodel.cpp +++ b/examples/widgets/tutorials/modelview/5_edit/mymodel.cpp @@ -94,8 +94,8 @@ bool MyModel::setData(const QModelIndex & index, const QVariant & value, int rol //----------------------------------------------------------------- //! [quoting mymodel_f] -Qt::ItemFlags MyModel::flags(const QModelIndex & /*index*/) const +Qt::ItemFlags MyModel::flags(const QModelIndex &index) const { - return Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled ; + return Qt::ItemIsEditable | QAbstractTableModel::flags(index); } //! [quoting mymodel_f] -- cgit v1.2.3