diff options
Diffstat (limited to 'tests/auto/quick/qquicktreeview/testmodel.cpp')
| -rw-r--r-- | tests/auto/quick/qquicktreeview/testmodel.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/quick/qquicktreeview/testmodel.cpp b/tests/auto/quick/qquicktreeview/testmodel.cpp index a6a756ba68..231df4c5b0 100644 --- a/tests/auto/quick/qquicktreeview/testmodel.cpp +++ b/tests/auto/quick/qquicktreeview/testmodel.cpp @@ -129,7 +129,6 @@ bool TestModel::insertRows(int position, int rows, const QModelIndex &parent) return true; } - void insertColumnsRecursive(TreeItem *item, int row, int pos, int cols) { for (int col = 0; col < cols; col++) @@ -158,3 +157,11 @@ bool TestModel::insertColumns(int position, int cols, const QModelIndex &parent) endInsertColumns(); return true; } + +Qt::ItemFlags TestModel::flags(const QModelIndex &index) const +{ + if (m_editableIndices.contains(index)) + return Qt::ItemIsSelectable|Qt::ItemIsEnabled|Qt::ItemIsEditable; + + return Qt::ItemIsSelectable|Qt::ItemIsEnabled; +} |
