QVirtualKeyboardSelectionListModel QML Type
Provides a data model for the selection lists. More...
Import Statement: | import QtQuick.VirtualKeyboard 2.4 |
Instantiates: | QVirtualKeyboardSelectionListModel |
Signals
- void activeItemChanged(int index)
- void itemSelected(int index)
Methods
- void selectItem(int index)
Detailed Description
The QVirtualKeyboardSelectionListModel is a data model for word candidates provided by the input method.
An instance of QVirtualKeyboardSelectionListModel cannot be created directly. Instead, the QVirtualKeyboardInputEngine manages the instances and provides access to the model by QVirtualKeyboardInputEngine::wordCandidateListModel property.
The model exposes the following data roles for the list delegate:
display
Display text for item.wordCompletionLength
Word completion length for item.dictionaryType
Dictionary type of the word, see QVirtualKeyboardSelectionListModel::DictionaryType.canRemoveSuggestion
A boolean indicating if the word can be removed from the dictionary.
The activeItemChanged signal indicates which item is currently highlighted by the input method. The view should respond to this signal by highlighting the corresponding item in the list.
The user selection is handled by the selectItem() method. The view should be invoke this method when the user selects an item from the list.
Signal Documentation
void 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 in the list.
void itemSelected(int index) |
This signal is emitted when an item at index is selected by the user.
Method Documentation
void 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.