summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qsortfilterproxymodel.cpp
diff options
context:
space:
mode:
authorGeir Vattekar <geir.vattekar@nokia.com>2010-09-15 13:30:55 +0200
committerGeir Vattekar <geir.vattekar@nokia.com>2010-09-15 13:30:55 +0200
commit15ba1ff23c140849d3cac32a5005c352cd5a699f (patch)
tree78e8b16c9b5b13527ce23efc26309995c35b72f6 /src/gui/itemviews/qsortfilterproxymodel.cpp
parentf78119906b0ffc7fd3dd36d6d827d456478a7fd5 (diff)
Doc: Note on updating proxy models with dynamic sort filters
Task-number: QT-689 Reviewed-by: David Boddie
Diffstat (limited to 'src/gui/itemviews/qsortfilterproxymodel.cpp')
-rw-r--r--src/gui/itemviews/qsortfilterproxymodel.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp
index 953a7f1774..dc8d93814f 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.cpp
+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp
@@ -2230,6 +2230,14 @@ void QSortFilterProxyModel::setFilterFixedString(const QString &pattern)
\brief whether the proxy model is dynamically sorted and filtered
whenever the contents of the source model change
+ Note that you should not update the source model through the proxy
+ model when dynamicSortFilter is true. For instance, if you set the
+ proxy model on a QComboBox, then using functions that update the
+ model, e.g., \l{QComboBox::}{addItem()}, will not work as
+ expected. An alternative is to set dynamicSortFilter to false and
+ call \l{QSortFilterProxyModel::}{sort()} after adding items to the
+ QComboBox.
+
The default value is false.
*/
bool QSortFilterProxyModel::dynamicSortFilter() const