[][src]Struct qt_widgets::QCompleter

#[repr(C)]pub struct QCompleter { /* fields omitted */ }

The QCompleter class provides completions based on an item model.

C++ class: QCompleter.

C++ documentation:

The QCompleter class provides completions based on an item model.

You can use QCompleter to provide auto completions in any Qt widget, such as QLineEdit and QComboBox. When the user starts typing a word, QCompleter suggests possible ways of completing the word, based on a word list. The word list is provided as a QAbstractItemModel. (For simple applications, where the word list is static, you can pass a QStringList to QCompleter's constructor.)

Methods

impl QCompleter[src]

pub fn slot_set_completion_prefix(&self) -> Receiver<(*const QString,)>[src]

This property holds the completion prefix used to provide completions.

Returns a built-in Qt slot QCompleter::setCompletionPrefix that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds the completion prefix used to provide completions.

The completionModel() is updated to reflect the list of possible matches for prefix.

Access functions:

QString completionPrefix() const
void setCompletionPrefix(const QString &prefix)

pub fn slot_complete(&self) -> Receiver<(*const QRect,)>[src]

For QCompleter::PopupCompletion and QCompletion::UnfilteredPopupCompletion modes, calling this function displays the popup displaying the current completions. By default, if rect is not specified, the popup is displayed on the bottom of the widget(). If rect is specified the popup is displayed on the left edge of the rectangle.

Returns a built-in Qt slot QCompleter::complete that can be passed to qt_core::Signal::connect.

C++ documentation:

For QCompleter::PopupCompletion and QCompletion::UnfilteredPopupCompletion modes, calling this function displays the popup displaying the current completions. By default, if rect is not specified, the popup is displayed on the bottom of the widget(). If rect is specified the popup is displayed on the left edge of the rectangle.

For QCompleter::InlineCompletion mode, the highlighted() signal is fired with the current completion.

pub fn slot_set_wrap_around(&self) -> Receiver<(bool,)>[src]

This property holds the completions wrap around when navigating through items

Returns a built-in Qt slot QCompleter::setWrapAround that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds the completions wrap around when navigating through items

The default is true.

This property was introduced in Qt 4.3.

Access functions:

bool wrapAround() const
void setWrapAround(bool wrap)

pub fn activated(&self) -> Signal<(*const QString,)>[src]

This signal is sent when an item in the popup() is activated by the user (by clicking or pressing return). The item's text is given.

Returns a built-in Qt signal QCompleter::activated that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is sent when an item in the popup() is activated by the user (by clicking or pressing return). The item's text is given.

Note: Signal activated is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(completer, static_cast<void(QCompleter::)(const QString &)>(&QCompleter::activated), [=](const QString &text){ / ... */ });

pub fn activated2(&self) -> Signal<(*const QModelIndex,)>[src]

This signal is sent when an item in the popup() is activated by the user. (by clicking or pressing return). The item's index in the completionModel() is given.

Returns a built-in Qt signal QCompleter::activated that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is sent when an item in the popup() is activated by the user. (by clicking or pressing return). The item's index in the completionModel() is given.

Note: Signal activated is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(completer, static_cast<void(QCompleter::)(const QModelIndex &)>(&QCompleter::activated), [=](const QModelIndex &index){ / ... */ });

pub fn highlighted(&self) -> Signal<(*const QString,)>[src]

This signal is sent when an item in the popup() is highlighted by the user. It is also sent if complete() is called with the completionMode() set to QCompleter::InlineCompletion. The item's text is given.

Returns a built-in Qt signal QCompleter::highlighted that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is sent when an item in the popup() is highlighted by the user. It is also sent if complete() is called with the completionMode() set to QCompleter::InlineCompletion. The item's text is given.

Note: Signal highlighted is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(completer, static_cast<void(QCompleter::)(const QString &)>(&QCompleter::highlighted), [=](const QString &text){ / ... */ });

pub fn highlighted2(&self) -> Signal<(*const QModelIndex,)>[src]

This signal is sent when an item in the popup() is highlighted by the user. It is also sent if complete() is called with the completionMode() set to QCompleter::InlineCompletion. The item's index in the completionModel() is given.

Returns a built-in Qt signal QCompleter::highlighted that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is sent when an item in the popup() is highlighted by the user. It is also sent if complete() is called with the completionMode() set to QCompleter::InlineCompletion. The item's index in the completionModel() is given.

Note: Signal highlighted is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(completer, static_cast<void(QCompleter::)(const QModelIndex &)>(&QCompleter::highlighted), [=](const QModelIndex &index){ / ... */ });

pub unsafe fn case_sensitivity(&self) -> CaseSensitivity[src]

This property holds the case sensitivity of the matching

Calls C++ function: Qt::CaseSensitivity QCompleter::caseSensitivity() const.

C++ documentation:

This property holds the case sensitivity of the matching

The default is Qt::CaseSensitive.

Access functions:

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

See also completionColumn, completionRole, and modelSorting.

pub unsafe fn complete_1a(&self, rect: impl CastInto<Ref<QRect>>)[src]

For QCompleter::PopupCompletion and QCompletion::UnfilteredPopupCompletion modes, calling this function displays the popup displaying the current completions. By default, if rect is not specified, the popup is displayed on the bottom of the widget(). If rect is specified the popup is displayed on the left edge of the rectangle.

Calls C++ function: [slot] void QCompleter::complete(const QRect& rect = …).

C++ documentation:

For QCompleter::PopupCompletion and QCompletion::UnfilteredPopupCompletion modes, calling this function displays the popup displaying the current completions. By default, if rect is not specified, the popup is displayed on the bottom of the widget(). If rect is specified the popup is displayed on the left edge of the rectangle.

For QCompleter::InlineCompletion mode, the highlighted() signal is fired with the current completion.

pub unsafe fn complete_0a(&self)[src]

For QCompleter::PopupCompletion and QCompletion::UnfilteredPopupCompletion modes, calling this function displays the popup displaying the current completions. By default, if rect is not specified, the popup is displayed on the bottom of the widget(). If rect is specified the popup is displayed on the left edge of the rectangle.

Calls C++ function: [slot] void QCompleter::complete().

C++ documentation:

For QCompleter::PopupCompletion and QCompletion::UnfilteredPopupCompletion modes, calling this function displays the popup displaying the current completions. By default, if rect is not specified, the popup is displayed on the bottom of the widget(). If rect is specified the popup is displayed on the left edge of the rectangle.

For QCompleter::InlineCompletion mode, the highlighted() signal is fired with the current completion.

pub unsafe fn completion_column(&self) -> c_int[src]

This property holds the column in the model in which completions are searched for.

Calls C++ function: int QCompleter::completionColumn() const.

C++ documentation:

This property holds the column in the model in which completions are searched for.

If the popup() is a QListView, it is automatically setup to display this column.

By default, the match column is 0.

Access functions:

int completionColumn() const
void setCompletionColumn(int column)

See also completionRole and caseSensitivity.

pub unsafe fn completion_count(&self) -> c_int[src]

Returns the number of completions for the current prefix. For an unsorted model with a large number of items this can be expensive. Use setCurrentRow() and currentCompletion() to iterate through all the completions.

Calls C++ function: int QCompleter::completionCount() const.

C++ documentation:

Returns the number of completions for the current prefix. For an unsorted model with a large number of items this can be expensive. Use setCurrentRow() and currentCompletion() to iterate through all the completions.

pub unsafe fn completion_mode(&self) -> CompletionMode[src]

how the completions are provided to the user

Calls C++ function: QCompleter::CompletionMode QCompleter::completionMode() const.

C++ documentation:

how the completions are provided to the user

The default value is QCompleter::PopupCompletion.

Access functions:

CompletionMode completionMode() const
void setCompletionMode(CompletionMode mode)

pub unsafe fn completion_model(&self) -> QPtr<QAbstractItemModel>[src]

Returns the completion model. The completion model is a read-only list model that contains all the possible matches for the current completion prefix. The completion model is auto-updated to reflect the current completions.

Calls C++ function: QAbstractItemModel* QCompleter::completionModel() const.

C++ documentation:

Returns the completion model. The completion model is a read-only list model that contains all the possible matches for the current completion prefix. The completion model is auto-updated to reflect the current completions.

Note: The return value of this function is defined to be an QAbstractItemModel purely for generality. This actual kind of model returned is an instance of an QAbstractProxyModel subclass.

See also completionPrefix and model().

pub unsafe fn completion_prefix(&self) -> CppBox<QString>[src]

This property holds the completion prefix used to provide completions.

Calls C++ function: QString QCompleter::completionPrefix() const.

C++ documentation:

This property holds the completion prefix used to provide completions.

The completionModel() is updated to reflect the list of possible matches for prefix.

Access functions:

QString completionPrefix() const
void setCompletionPrefix(const QString &prefix)

pub unsafe fn completion_role(&self) -> c_int[src]

This property holds the item role to be used to query the contents of items for matching.

Calls C++ function: int QCompleter::completionRole() const.

C++ documentation:

This property holds the item role to be used to query the contents of items for matching.

The default role is Qt::EditRole.

Access functions:

int completionRole() const
void setCompletionRole(int role)

See also completionColumn and caseSensitivity.

pub unsafe fn current_completion(&self) -> CppBox<QString>[src]

Returns the current completion string. This includes the completionPrefix. When used alongside setCurrentRow(), it can be used to iterate through all the matches.

Calls C++ function: QString QCompleter::currentCompletion() const.

C++ documentation:

Returns the current completion string. This includes the completionPrefix. When used alongside setCurrentRow(), it can be used to iterate through all the matches.

See also setCurrentRow() and currentIndex().

pub unsafe fn current_index(&self) -> CppBox<QModelIndex>[src]

Returns the model index of the current completion in the completionModel().

Calls C++ function: QModelIndex QCompleter::currentIndex() const.

C++ documentation:

Returns the model index of the current completion in the completionModel().

See also setCurrentRow(), currentCompletion(), and model().

pub unsafe fn current_row(&self) -> c_int[src]

Returns the current row.

Calls C++ function: int QCompleter::currentRow() const.

C++ documentation:

Returns the current row.

See also setCurrentRow().

pub unsafe fn filter_mode(&self) -> QFlags<MatchFlag>[src]

how the filtering is performed

Calls C++ function: QFlags<Qt::MatchFlag> QCompleter::filterMode() const.

C++ documentation:

how the filtering is performed

If filterMode is set to Qt::MatchStartsWith, only those entries that start with the typed characters will be displayed. Qt::MatchContains will display the entries that contain the typed characters, and Qt::MatchEndsWith the ones that end with the typed characters.

Currently, only these three modes are implemented. Setting filterMode to any other Qt::MatchFlag will issue a warning, and no action will be performed.

The default mode is Qt::MatchStartsWith.

This property was introduced in Qt 5.2.

Access functions:

Qt::MatchFlags filterMode() const
void setFilterMode(Qt::MatchFlags filterMode)

pub unsafe fn max_visible_items(&self) -> c_int[src]

This property holds the maximum allowed size on screen of the completer, measured in items

Calls C++ function: int QCompleter::maxVisibleItems() const.

C++ documentation:

This property holds the maximum allowed size on screen of the completer, measured in items

By default, this property has a value of 7.

This property was introduced in Qt 4.6.

Access functions:

int maxVisibleItems() const
void setMaxVisibleItems(int maxItems)

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QCompleter::metaObject() const.

pub unsafe fn model(&self) -> QPtr<QAbstractItemModel>[src]

Returns the model that provides completion strings.

Calls C++ function: QAbstractItemModel* QCompleter::model() const.

C++ documentation:

Returns the model that provides completion strings.

See also setModel() and completionModel().

pub unsafe fn model_sorting(&self) -> ModelSorting[src]

This property holds the way the model is sorted

Calls C++ function: QCompleter::ModelSorting QCompleter::modelSorting() const.

C++ documentation:

This property holds the way the model is sorted

By default, no assumptions are made about the order of the items in the model that provides the completions.

If the model's data for the completionColumn() and completionRole() is sorted in ascending order, you can set this property to CaseSensitivelySortedModel or CaseInsensitivelySortedModel. On large models, this can lead to significant performance improvements because the completer object can then use a binary search algorithm instead of linear search algorithm.

The sort order (i.e ascending or descending order) of the model is determined dynamically by inspecting the contents of the model.

Note: The performance improvements described above cannot take place when the completer's caseSensitivity is different to the case sensitivity used by the model's when sorting.

Access functions:

ModelSorting modelSorting() const
void setModelSorting(ModelSorting sorting)

See also setCaseSensitivity() and QCompleter::ModelSorting.

pub unsafe fn from_q_object(
    parent: impl CastInto<Ptr<QObject>>
) -> QBox<QCompleter>
[src]

Constructs a completer object with the given parent.

Calls C++ function: [constructor] void QCompleter::QCompleter(QObject* parent = …).

C++ documentation:

Constructs a completer object with the given parent.

pub unsafe fn from_q_abstract_item_model_q_object(
    model: impl CastInto<Ptr<QAbstractItemModel>>,
    parent: impl CastInto<Ptr<QObject>>
) -> QBox<QCompleter>
[src]

Constructs a completer object with the given parent that provides completions from the specified model.

Calls C++ function: [constructor] void QCompleter::QCompleter(QAbstractItemModel* model, QObject* parent = …).

C++ documentation:

Constructs a completer object with the given parent that provides completions from the specified model.

pub unsafe fn from_q_string_list_q_object(
    completions: impl CastInto<Ref<QStringList>>,
    parent: impl CastInto<Ptr<QObject>>
) -> QBox<QCompleter>
[src]

Constructs a QCompleter object with the given parent that uses the specified list as a source of possible completions.

Calls C++ function: [constructor] void QCompleter::QCompleter(const QStringList& completions, QObject* parent = …).

C++ documentation:

Constructs a QCompleter object with the given parent that uses the specified list as a source of possible completions.

pub unsafe fn new() -> QBox<QCompleter>[src]

The QCompleter class provides completions based on an item model.

Calls C++ function: [constructor] void QCompleter::QCompleter().

C++ documentation:

The QCompleter class provides completions based on an item model.

You can use QCompleter to provide auto completions in any Qt widget, such as QLineEdit and QComboBox. When the user starts typing a word, QCompleter suggests possible ways of completing the word, based on a word list. The word list is provided as a QAbstractItemModel. (For simple applications, where the word list is static, you can pass a QStringList to QCompleter's constructor.)

pub unsafe fn from_q_abstract_item_model(
    model: impl CastInto<Ptr<QAbstractItemModel>>
) -> QBox<QCompleter>
[src]

Constructs a completer object with the given parent that provides completions from the specified model.

Calls C++ function: [constructor] void QCompleter::QCompleter(QAbstractItemModel* model).

C++ documentation:

Constructs a completer object with the given parent that provides completions from the specified model.

pub unsafe fn from_q_string_list(
    completions: impl CastInto<Ref<QStringList>>
) -> QBox<QCompleter>
[src]

Constructs a QCompleter object with the given parent that uses the specified list as a source of possible completions.

Calls C++ function: [constructor] void QCompleter::QCompleter(const QStringList& completions).

C++ documentation:

Constructs a QCompleter object with the given parent that uses the specified list as a source of possible completions.

pub unsafe fn path_from_index(
    &self,
    index: impl CastInto<Ref<QModelIndex>>
) -> CppBox<QString>
[src]

Returns the path for the given index. The completer object uses this to obtain the completion text from the underlying model.

Calls C++ function: virtual QString QCompleter::pathFromIndex(const QModelIndex& index) const.

C++ documentation:

Returns the path for the given index. The completer object uses this to obtain the completion text from the underlying model.

The default implementation returns the edit role of the item for list models. It returns the absolute file path if the model is a QFileSystemModel.

See also splitPath().

pub unsafe fn popup(&self) -> QPtr<QAbstractItemView>[src]

Returns the popup used to display completions.

Calls C++ function: QAbstractItemView* QCompleter::popup() const.

C++ documentation:

Returns the popup used to display completions.

See also setPopup().

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QCompleter::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QCompleter::qt_metacast(const char* arg1).

pub unsafe fn set_case_sensitivity(&self, case_sensitivity: CaseSensitivity)[src]

This property holds the case sensitivity of the matching

Calls C++ function: void QCompleter::setCaseSensitivity(Qt::CaseSensitivity caseSensitivity).

C++ documentation:

This property holds the case sensitivity of the matching

The default is Qt::CaseSensitive.

Access functions:

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

See also completionColumn, completionRole, and modelSorting.

pub unsafe fn set_completion_column(&self, column: c_int)[src]

This property holds the column in the model in which completions are searched for.

Calls C++ function: void QCompleter::setCompletionColumn(int column).

C++ documentation:

This property holds the column in the model in which completions are searched for.

If the popup() is a QListView, it is automatically setup to display this column.

By default, the match column is 0.

Access functions:

int completionColumn() const
void setCompletionColumn(int column)

See also completionRole and caseSensitivity.

pub unsafe fn set_completion_mode(&self, mode: CompletionMode)[src]

how the completions are provided to the user

Calls C++ function: void QCompleter::setCompletionMode(QCompleter::CompletionMode mode).

C++ documentation:

how the completions are provided to the user

The default value is QCompleter::PopupCompletion.

Access functions:

CompletionMode completionMode() const
void setCompletionMode(CompletionMode mode)

pub unsafe fn set_completion_prefix(&self, prefix: impl CastInto<Ref<QString>>)[src]

This property holds the completion prefix used to provide completions.

Calls C++ function: [slot] void QCompleter::setCompletionPrefix(const QString& prefix).

C++ documentation:

This property holds the completion prefix used to provide completions.

The completionModel() is updated to reflect the list of possible matches for prefix.

Access functions:

QString completionPrefix() const
void setCompletionPrefix(const QString &prefix)

pub unsafe fn set_completion_role(&self, role: c_int)[src]

This property holds the item role to be used to query the contents of items for matching.

Calls C++ function: void QCompleter::setCompletionRole(int role).

C++ documentation:

This property holds the item role to be used to query the contents of items for matching.

The default role is Qt::EditRole.

Access functions:

int completionRole() const
void setCompletionRole(int role)

See also completionColumn and caseSensitivity.

pub unsafe fn set_current_row(&self, row: c_int) -> bool[src]

Sets the current row to the row specified. Returns true if successful; otherwise returns false.

Calls C++ function: bool QCompleter::setCurrentRow(int row).

C++ documentation:

Sets the current row to the row specified. Returns true if successful; otherwise returns false.

This function may be used along with currentCompletion() to iterate through all the possible completions.

See also currentRow(), currentCompletion(), and completionCount().

pub unsafe fn set_filter_mode(&self, filter_mode: QFlags<MatchFlag>)[src]

how the filtering is performed

Calls C++ function: void QCompleter::setFilterMode(QFlags<Qt::MatchFlag> filterMode).

C++ documentation:

how the filtering is performed

If filterMode is set to Qt::MatchStartsWith, only those entries that start with the typed characters will be displayed. Qt::MatchContains will display the entries that contain the typed characters, and Qt::MatchEndsWith the ones that end with the typed characters.

Currently, only these three modes are implemented. Setting filterMode to any other Qt::MatchFlag will issue a warning, and no action will be performed.

The default mode is Qt::MatchStartsWith.

This property was introduced in Qt 5.2.

Access functions:

Qt::MatchFlags filterMode() const
void setFilterMode(Qt::MatchFlags filterMode)

pub unsafe fn set_max_visible_items(&self, max_items: c_int)[src]

This property holds the maximum allowed size on screen of the completer, measured in items

Calls C++ function: void QCompleter::setMaxVisibleItems(int maxItems).

C++ documentation:

This property holds the maximum allowed size on screen of the completer, measured in items

By default, this property has a value of 7.

This property was introduced in Qt 4.6.

Access functions:

int maxVisibleItems() const
void setMaxVisibleItems(int maxItems)

pub unsafe fn set_model(&self, c: impl CastInto<Ptr<QAbstractItemModel>>)[src]

Sets the model which provides completions to model. The model can be list model or a tree model. If a model has been already previously set and it has the QCompleter as its parent, it is deleted.

Calls C++ function: void QCompleter::setModel(QAbstractItemModel* c).

C++ documentation:

Sets the model which provides completions to model. The model can be list model or a tree model. If a model has been already previously set and it has the QCompleter as its parent, it is deleted.

For convenience, if model is a QFileSystemModel, QCompleter switches its caseSensitivity to Qt::CaseInsensitive on Windows and Qt::CaseSensitive on other platforms.

See also completionModel(), modelSorting, and Handling Tree Models.

pub unsafe fn set_model_sorting(&self, sorting: ModelSorting)[src]

This property holds the way the model is sorted

Calls C++ function: void QCompleter::setModelSorting(QCompleter::ModelSorting sorting).

C++ documentation:

This property holds the way the model is sorted

By default, no assumptions are made about the order of the items in the model that provides the completions.

If the model's data for the completionColumn() and completionRole() is sorted in ascending order, you can set this property to CaseSensitivelySortedModel or CaseInsensitivelySortedModel. On large models, this can lead to significant performance improvements because the completer object can then use a binary search algorithm instead of linear search algorithm.

The sort order (i.e ascending or descending order) of the model is determined dynamically by inspecting the contents of the model.

Note: The performance improvements described above cannot take place when the completer's caseSensitivity is different to the case sensitivity used by the model's when sorting.

Access functions:

ModelSorting modelSorting() const
void setModelSorting(ModelSorting sorting)

See also setCaseSensitivity() and QCompleter::ModelSorting.

pub unsafe fn set_popup(&self, popup: impl CastInto<Ptr<QAbstractItemView>>)[src]

Sets the popup used to display completions to popup. QCompleter takes ownership of the view.

Calls C++ function: void QCompleter::setPopup(QAbstractItemView* popup).

C++ documentation:

Sets the popup used to display completions to popup. QCompleter takes ownership of the view.

A QListView is automatically created when the completionMode() is set to QCompleter::PopupCompletion or QCompleter::UnfilteredPopupCompletion. The default popup displays the completionColumn().

Ensure that this function is called before the view settings are modified. This is required since view's properties may require that a model has been set on the view (for example, hiding columns in the view requires a model to be set on the view).

See also popup().

pub unsafe fn set_widget(&self, widget: impl CastInto<Ptr<QWidget>>)[src]

Sets the widget for which completion are provided for to widget. This function is automatically called when a QCompleter is set on a QLineEdit using QLineEdit::setCompleter() or on a QComboBox using QComboBox::setCompleter(). The widget needs to be set explicitly when providing completions for custom widgets.

Calls C++ function: void QCompleter::setWidget(QWidget* widget).

C++ documentation:

Sets the widget for which completion are provided for to widget. This function is automatically called when a QCompleter is set on a QLineEdit using QLineEdit::setCompleter() or on a QComboBox using QComboBox::setCompleter(). The widget needs to be set explicitly when providing completions for custom widgets.

See also widget(), setModel(), and setPopup().

pub unsafe fn set_wrap_around(&self, wrap: bool)[src]

This property holds the completions wrap around when navigating through items

Calls C++ function: [slot] void QCompleter::setWrapAround(bool wrap).

C++ documentation:

This property holds the completions wrap around when navigating through items

The default is true.

This property was introduced in Qt 4.3.

Access functions:

bool wrapAround() const
void setWrapAround(bool wrap)

pub unsafe fn split_path(
    &self,
    path: impl CastInto<Ref<QString>>
) -> CppBox<QStringList>
[src]

Splits the given path into strings that are used to match at each level in the model().

Calls C++ function: virtual QStringList QCompleter::splitPath(const QString& path) const.

C++ documentation:

Splits the given path into strings that are used to match at each level in the model().

The default implementation of splitPath() splits a file system path based on QDir::separator() when the sourceModel() is a QFileSystemModel.

When used with list models, the first item in the returned list is used for matching.

See also pathFromIndex() and Handling Tree Models.

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QCompleter::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QCompleter::trUtf8(const char* s, const char* c, int n).

pub unsafe fn widget(&self) -> QPtr<QWidget>[src]

Returns the widget for which the completer object is providing completions.

Calls C++ function: QWidget* QCompleter::widget() const.

C++ documentation:

Returns the widget for which the completer object is providing completions.

See also setWidget().

pub unsafe fn wrap_around(&self) -> bool[src]

This property holds the completions wrap around when navigating through items

Calls C++ function: bool QCompleter::wrapAround() const.

C++ documentation:

This property holds the completions wrap around when navigating through items

The default is true.

This property was introduced in Qt 4.3.

Access functions:

bool wrapAround() const
void setWrapAround(bool wrap)

Trait Implementations

impl CppDeletable for QCompleter[src]

unsafe fn delete(&self)[src]

Destroys the completer object.

Calls C++ function: virtual [destructor] void QCompleter::~QCompleter().

C++ documentation:

Destroys the completer object.

impl Deref for QCompleter[src]

type Target = QObject

The resulting type after dereferencing.

fn deref(&self) -> &QObject[src]

Calls C++ function: QObject* static_cast<QObject*>(QCompleter* ptr).

impl DynamicCast<QCompleter> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QCompleter>[src]

Calls C++ function: QCompleter* dynamic_cast<QCompleter*>(QObject* ptr).

impl StaticDowncast<QCompleter> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QCompleter>[src]

Calls C++ function: QCompleter* static_cast<QCompleter*>(QObject* ptr).

impl StaticUpcast<QObject> for QCompleter[src]

unsafe fn static_upcast(ptr: Ptr<QCompleter>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QCompleter* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.