Get the default flags from the direct-base, not the indirect.

QStringListModel inherits QAbstractListModel.

Change-Id: I942321b2e5949f54041e11089f4131a646618b9e
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
bb10
Stephen Kelly 2012-12-28 15:34:54 +01:00 committed by The Qt Project
parent 7ee9551b62
commit 3f374afaae
1 changed files with 2 additions and 2 deletions

View File

@ -170,9 +170,9 @@ QVariant QStringListModel::data(const QModelIndex &index, int role) const
Qt::ItemFlags QStringListModel::flags(const QModelIndex &index) const
{
if (!index.isValid())
return QAbstractItemModel::flags(index) | Qt::ItemIsDropEnabled;
return QAbstractListModel::flags(index) | Qt::ItemIsDropEnabled;
return QAbstractItemModel::flags(index) | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled;
return QAbstractListModel::flags(index) | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled;
}
/*!