QCompleter Class
Header:#include < QCompleter >
qmake:QT += widgets
Since:Qt 4.2
Inherits:QObject
This class was introduced in Qt 4.2.
Public Types
enum CompletionMode { PopupCompletion, InlineCompletion, UnfilteredPopupCompletion }
enum ModelSorting { UnsortedModel, CaseSensitivelySortedModel, CaseInsensitivelySortedModel }
Properties
caseSensitivity : Qt::CaseSensitivity
completionColumn : int
completionMode : CompletionMode
completionPrefix : QString
completionRole : int
filterMode : Qt::MatchFlags
maxVisibleItems : int
modelSorting : ModelSorting
wrapAround : bool
Public Functions
QCompleter(const QStringList &list, QObject *parent = nullptr)
QCompleter(QAbstractItemModel *model, QObject *parent = nullptr)
QCompleter(QObject *parent = nullptr)
virtual ~QCompleter() override
Qt::CaseSensitivity caseSensitivity() const
int completionColumn() const
int completionCount() const
QCompleter::CompletionMode completionMode() const
QAbstractItemModel *completionModel() const
QString completionPrefix() const
int completionRole() const
QString currentCompletion() const
QModelIndex currentIndex() const
int currentRow() const
Qt::MatchFlags filterMode() const
int maxVisibleItems() const
QAbstractItemModel *model() const
QCompleter::ModelSorting modelSorting() const
virtual QString pathFromIndex(const QModelIndex &index) const
QAbstractItemView *popup() const
void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity)
void setCompletionColumn(int column)
void setCompletionMode(QCompleter::CompletionMode mode)
void setCompletionRole(int role)
bool setCurrentRow(int row)
void setFilterMode(Qt::MatchFlags filterMode)
void setMaxVisibleItems(int maxItems)
void setModel(QAbstractItemModel *model)
void setModelSorting(QCompleter::ModelSorting sorting)
void setPopup(QAbstractItemView *popup)
void setWidget(QWidget *widget)
virtual QStringList splitPath(const QString &path) const
QWidget *widget() const
bool wrapAround() const
Public Slots
void complete(const QRect &rect = QRect())
void setCompletionPrefix(const QString &prefix)
void setWrapAround(bool wrap)
Signals
void activated(const QModelIndex