path: root/src/sql
diff options
authorAndy Shaw <>2018-08-29 11:52:18 +0200
committerAndy Shaw <>2018-09-03 10:24:09 +0000
commit69a2bc7a2a9ab7192024f93df3af9d07b15ebcf1 (patch)
tree8ba5cf216dffafb4a88f366fa7137d44db6d6e19 /src/sql
parentfe463dd4228c42d93ffd0a26cb31281b230a8e52 (diff)
Doc: Explicitly state that QSqlTableModel only handles EditRole
Fixes: 5.12.0 Task-number: QTBUG-70234 Change-Id: I65c6aa60048182c5408dca2aa20098af363b10ec Reviewed-by: Christian Ehrlicher <> Reviewed-by: Venugopal Shivashankar <>
Diffstat (limited to 'src/sql')
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index 865f76c73a..a33f76838f 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -565,6 +565,10 @@ bool QSqlTableModel::isDirty(const QModelIndex &index) const
Returns \c true if the value could be set or false on error, for
example if \a index is out of bounds.
+ Returns \c false if the role is not Qt::EditRole. To set data
+ for roles other than EditRole, either use a custom proxy model
+ or subclass QSqlTableModel.
\sa editStrategy(), data(), submit(), submitAll(), revertRow()
bool QSqlTableModel::setData(const QModelIndex &index, const QVariant &value, int role)