summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeir Vattekar <geir.vattekar@nokia.com>2010-09-15 11:30:55 (GMT)
committerGeir Vattekar <geir.vattekar@nokia.com>2010-09-15 11:30:55 (GMT)
commit15ba1ff23c140849d3cac32a5005c352cd5a699f (patch)
tree78e8b16c9b5b13527ce23efc26309995c35b72f6
parentf78119906b0ffc7fd3dd36d6d827d456478a7fd5 (diff)
downloadQt-15ba1ff23c140849d3cac32a5005c352cd5a699f.zip
Qt-15ba1ff23c140849d3cac32a5005c352cd5a699f.tar.gz
Qt-15ba1ff23c140849d3cac32a5005c352cd5a699f.tar.bz2
Doc: Note on updating proxy models with dynamic sort filters
Task-number: QT-689 Reviewed-by: David Boddie
-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 953a7f1..dc8d938 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