summaryrefslogtreecommitdiffstats
path: root/src/widgets/util/qcompleter.h
diff options
context:
space:
mode:
authorOto Magaldadze <omagaldadze@gmail.com>2012-12-31 14:11:25 +0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 23:45:06 +0200
commit6b95130faa31307579cb3711cab2101d07d20823 (patch)
treee67c0d181eaf5ea8545417039c049e088b9ba0f6 /src/widgets/util/qcompleter.h
parentef5455429f30ec9c8236e5240ed8f96af6ca9271 (diff)
QCompleter::setFilterMode() add property filterMode.
QCompleter::setFilterMode(Qt::MatchContains) will enable filtering out entries that contain typed characters in any place, instead of the default behavior when only those entries that start with typed characters are displayed. Qt::MatchEndsWith is also possible. QCompleter::setFilterMode(Qt::MatchStartsWith) will bring the default behavior back. Task-number: QTBUG-3414 Change-Id: I3845704c59eb8fc401e9a650c54a9c934ed28c2e Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/widgets/util/qcompleter.h')
-rw-r--r--src/widgets/util/qcompleter.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/util/qcompleter.h b/src/widgets/util/qcompleter.h
index 737d9f5fba..c9533d5474 100644
--- a/src/widgets/util/qcompleter.h
+++ b/src/widgets/util/qcompleter.h
@@ -63,6 +63,7 @@ class Q_WIDGETS_EXPORT QCompleter : public QObject
Q_OBJECT
Q_PROPERTY(QString completionPrefix READ completionPrefix WRITE setCompletionPrefix)
Q_PROPERTY(ModelSorting modelSorting READ modelSorting WRITE setModelSorting)
+ Q_PROPERTY(Qt::MatchFlags filterMode READ filterMode WRITE setFilterMode)
Q_PROPERTY(CompletionMode completionMode READ completionMode WRITE setCompletionMode)
Q_PROPERTY(int completionColumn READ completionColumn WRITE setCompletionColumn)
Q_PROPERTY(int completionRole READ completionRole WRITE setCompletionRole)
@@ -99,6 +100,9 @@ public:
void setCompletionMode(CompletionMode mode);
CompletionMode completionMode() const;
+ void setFilterMode(Qt::MatchFlags filterMode);
+ Qt::MatchFlags filterMode() const;
+
QAbstractItemView *popup() const;
void setPopup(QAbstractItemView *popup);