- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties

# QCompleter Class Reference

Search for all occurrences

## Detailed Description

Definition at line 64 of file qcompleter.h.

`#include <qcompleter.h>`

Inheritance diagram for QCompleter:
[legend]

List of all members.

## Public Types
enum | CompletionMode { PopupCompletion, UnfilteredPopupCompletion, InlineCompletion }
enum | ModelSorting { UnsortedModel = 0, CaseSensitivelySortedModel, CaseInsensitivelySortedModel }
## Public Slots
void | setCompletionPrefix (const QString &prefix)
void | complete (const QRect &rect=QRect())
void | setWrapAround (bool wrap)
## Signals
void | activated (const QString &text)
void | activated (const QModelIndex &index)
void | highlighted (const QString &text)
void | highlighted (const QModelIndex &index)
## Public Member Functions
| QCompleter (QObject *parent=0)
| QCompleter (QAbstractItemModel *model, QObject *parent=0)
| QCompleter (const QStringList &completions, QObject *parent=0)
| ~QCompleter ()
void | setWidget (QWidget *widget)
QWidget * | widget () const
void | setModel (QAbstractItemModel *c)
QAbstractItemModel * | model () const
void | setCompletionMode (CompletionMode mode)
CompletionMode | completionMode () const
QAbstractItemView * | popup () const
void | setPopup (QAbstractItemView *popup)
void | setCaseSensitivity (Qt::CaseSensitivity caseSensitivity)
Qt::CaseSensitivity | caseSensitivity () const
void | setModelSorting (ModelSorting sorting)
ModelSorting | modelSorting () const
void | setCompletionColumn (int column)
int | completionColumn () const
void | setCompletionRole (int role)
int | completionRole () const
bool | wrapAround () const
int | maxVisibleItems () const
void | setMaxVisibleItems (int maxItems)
int | completionCount () const
bool | setCurrentRow (int row)
int | currentRow () const
QModelIndex | currentIndex () const
QString | currentCompletion () const
QAbstractItemModel * | completionModel () const
QString | completionPrefix () const
virtual QString | pathFromIndex (const QModelIndex &index) const
virtual QStringList | splitPath (const QString &path) const
## Protected Member Functions
bool | eventFilter (QObject *o, QEvent *e)
bool | event (QEvent *)
## Properties
QString | completionPrefix
ModelSorting | modelSorting
CompletionMode | completionMode
int | completionColumn
int | completionRole
int | maxVisibleItems
Qt::CaseSensitivity | caseSensitivity
bool | wrapAround

## Member Enumeration Documentation

enum CompletionMode

Search for all occurrences

Enumerator:

  PopupCompletion | Search for all occurrences
  UnfilteredPopupCompletion | Search for all occurrences
  InlineCompletion | Search for all occurrences

Definition at line 77 of file qcompleter.h.

                            {
            PopupCompletion,
            UnfilteredPopupCompletion,
            InlineCompletion
        };

enum ModelSorting

Search for all occurrences

Enumerator:

  UnsortedModel | Search for all occurrences
  CaseSensitivelySortedModel | Search for all occurrences
  CaseInsensitivelySortedModel | Search for all occurrences

Definition at line 83 of file qcompleter.h.

                          {
            UnsortedModel = 0,
            CaseSensitivelySortedModel,
            CaseInsensitivelySortedModel
        };

## Constructor & Destructor Documentation

QCompleter | ( | QObject * | parent = `0` | ) |

QCompleter | ( | QAbstractItemModel * | model,
|  | QObject * | parent = `0`
| ) |  |

QCompleter | ( | const QStringList & | completions,
|  | QObject * | parent = `0`
| ) |  |

~QCompleter | ( |  | ) |

## Member Function Documentation

void setWidget | ( | QWidget * | widget | ) |

Search for all occurrences

QWidget* widget | ( |  | ) | const

Search for all occurrences

void setModel | ( | QAbstractItemModel * | c | ) |

Search for all occurrences

QAbstractItemModel* model | ( |  | ) | const

Search for all occurrences

void setCompletionMode | ( | CompletionMode | mode | ) |

Search for all occurrences

CompletionMode completionMode | ( |  | ) | const

Search for all occurrences

QAbstractItemView* popup | ( |  | ) | const

Search for all occurrences

void setPopup | ( | QAbstractItemView * | popup | ) |

Search for all occurrences

void setCaseSensitivity | ( | Qt::CaseSensitivity | caseSensitivity | ) |

Search for all occurrences

Qt::CaseSensitivity caseSensitivity | ( |  | ) | const

Search for all occurrences

void setModelSorting | ( | ModelSorting | sorting | ) |

Search for all occurrences

ModelSorting modelSorting | ( |  | ) | const

Search for all occurrences

void setCompletionColumn | ( | int | column | ) |

Search for all occurrences

int completionColumn | ( |  | ) | const

Search for all occurrences

void setCompletionRole | ( | int | role | ) |

Search for all occurrences

int completionRole | ( |  | ) | const

Search for all occurrences

bool wrapAround | ( |  | ) | const

Search for all occurrences

int maxVisibleItems | ( |  | ) | const

Search for all occurrences

void setMaxVisibleItems | ( | int | maxItems | ) |

Search for all occurrences

int completionCount | ( |  | ) | const

Search for all occurrences

bool setCurrentRow | ( | int | row | ) |

Search for all occurrences

int currentRow | ( |  | ) | const

Search for all occurrences

QModelIndex currentIndex | ( |  | ) | const

Search for all occurrences

QString currentCompletion | ( |  | ) | const

Search for all occurrences

QAbstractItemModel* completionModel | ( |  | ) | const

Search for all occurrences

QString completionPrefix | ( |  | ) | const

Search for all occurrences

void setCompletionPrefix | ( | const QString & | prefix | ) | `[slot]`

Search for all occurrences

void complete | ( | const QRect & | rect = `QRect()` | ) | `[slot]`

Search for all occurrences

void setWrapAround | ( | bool | wrap | ) | `[slot]`

Search for all occurrences

virtual QString pathFromIndex | ( | const QModelIndex & | index | ) | const `[virtual]`

Search for all occurrences

virtual QStringList splitPath | ( | const QString & | path | ) | const `[virtual]`

Search for all occurrences

bool eventFilter | ( | QObject * | o,
|  | QEvent * | e
| ) |  | `[protected, virtual]`

Search for all occurrences

Reimplemented from QObject.

bool event | ( | QEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QObject.

void activated | ( | const QString & | text | ) | `[signal]`

Search for all occurrences

void activated | ( | const QModelIndex & | index | ) | `[signal]`

Search for all occurrences

void highlighted | ( | const QString & | text | ) | `[signal]`

Search for all occurrences

void highlighted | ( | const QModelIndex & | index | ) | `[signal]`

Search for all occurrences

## Property Documentation

QString completionPrefix `[read, write]`

Search for all occurrences

Definition at line 67 of file qcompleter.h.

ModelSorting modelSorting `[read, write]`

Search for all occurrences

Definition at line 68 of file qcompleter.h.

CompletionMode completionMode `[read, write]`

Search for all occurrences

Definition at line 69 of file qcompleter.h.

int completionColumn `[read, write]`

Search for all occurrences

Definition at line 70 of file qcompleter.h.

int completionRole `[read, write]`

Search for all occurrences

Definition at line 71 of file qcompleter.h.

int maxVisibleItems `[read, write]`

Search for all occurrences

Definition at line 72 of file qcompleter.h.

Qt::CaseSensitivity caseSensitivity `[read, write]`

Search for all occurrences

Definition at line 73 of file qcompleter.h.

bool wrapAround `[read, write]`

Search for all occurrences

Definition at line 74 of file qcompleter.h.

The documentation for this class was generated from the following file:

- QtGui/qcompleter.h

QCompleter QCompleter QCompleter QCompleter QCompleter QCompleter QCompleter QCompleter QCompleter QCompleter
QCompleter QCompleter QCompleter QCompleter QCompleter QCompleter QCompleter QCompleter QCompleter QCompleter