用於選定列錶的列錶模型。 更多...
| 頭: | #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 和 (為選定列錶提供數據) 輸入法之間的橋梁。
此枚舉指定單詞的字典類型。
| 常量 | 值 | 描述 |
|---|---|---|
QVirtualKeyboardSelectionListModel::Default
|
0
|
單詞候選來自默認字典。 |
QVirtualKeyboardSelectionListModel::User
|
1
|
單詞候選來自用戶字典。 |
此枚舉指定請求數據的角色。
| 常量 | 值 | 描述 |
|---|---|---|
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. |
此枚舉指定選定列錶的類型。
| 常量 | 值 | 描述 |
|---|---|---|
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 在列錶中。
[signal]
void
QVirtualKeyboardSelectionListModel::
countChanged
()
[signal]
void
QVirtualKeyboardSelectionListModel::
itemSelected
(
int
index
)
此信號被發射當項位於 index 被用戶選中。
應調用此方法當用戶移除項在位置 index from the list. The removal is forwarded to the input method for further processing.
注意: 此函數可以被援引,通過元對象係統和從 QML。見 Q_INVOKABLE .
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 .