QVirtualKeyboardSelectionListModel 类

用于选定列表的列表模型。 更多...

头: #include <QVirtualKeyboardSelectionListModel>
qmake: QT += virtualkeyboard
实例化: SelectionListModel
继承: QAbstractListModel

公共类型

enum DictionaryType { Default, User }
enum Role { Display, DisplayRole, WordCompletionLength, WordCompletionLengthRole, Dictionary, CanRemoveSuggestion }
enum Type { WordCandidateList }

公共函数

int count () const
void removeItem (int index )
void selectItem (int index )

信号

void activeItemChanged (int index )
void countChanged ()
void itemSelected (int index )

静态公共成员

const QMetaObject staticMetaObject

额外继承成员

详细描述

用于选定列表的列表模型。

此类充当 UI 和 (为选定列表提供数据) 输入法之间的桥梁。

成员类型文档编制

enum QVirtualKeyboardSelectionListModel:: DictionaryType

此枚举指定单词的字典类型。

常量 描述
QVirtualKeyboardSelectionListModel::Default 0 单词候选来自默认字典。
QVirtualKeyboardSelectionListModel::User 1 单词候选来自用户字典。

enum QVirtualKeyboardSelectionListModel:: Role

此枚举指定请求数据的角色。

常量 描述
QVirtualKeyboardSelectionListModel::Display Qt::DisplayRole 要以文本形式渲染的数据。
QVirtualKeyboardSelectionListModel::DisplayRole 显示 obsolete 使用 Role::Display。
QVirtualKeyboardSelectionListModel::WordCompletionLength Qt::UserRole + 1 An integer specifying the length of the word the completion part expressed as the number of characters counted from the end of the string.
QVirtualKeyboardSelectionListModel::WordCompletionLengthRole WordCompletionLength obsolete 使用 Role::WordCompletionLength。
QVirtualKeyboardSelectionListModel::Dictionary 258 整数指定 { QVirtualKeyboardSelectionListModel::DictionaryType }{dictionary type}.
QVirtualKeyboardSelectionListModel::CanRemoveSuggestion 259 A boolean value indicating if the word candidate can be removed from the dictionary.

enum QVirtualKeyboardSelectionListModel:: Type

此枚举指定选定列表的类型。

常量 描述
QVirtualKeyboardSelectionListModel::WordCandidateList 0 展示单词候选列表。

成员函数文档编制

[signal] void QVirtualKeyboardSelectionListModel:: activeItemChanged ( int index )

This signal is emitted when the active item in the list changes. The UI should react to this signal by highlighting the item at index 在列表中。

int QVirtualKeyboardSelectionListModel:: count () const

[signal] void QVirtualKeyboardSelectionListModel:: countChanged ()

[signal] void QVirtualKeyboardSelectionListModel:: itemSelected ( int index )

此信号被发射当项位于 index 被用户选中。

void QVirtualKeyboardSelectionListModel:: removeItem ( int index )

应调用此方法当用户移除项在位置 index from the list. The removal is forwarded to the input method for further processing.

注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .

void QVirtualKeyboardSelectionListModel:: selectItem ( int index )

This method should be called when the user selects an item at position index from the list. The selection is forwarded to the input method for further processing.

注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .