SelectionListModel QML Type
選択リストのデータモデルを提供します。詳細...
| Import Statement: | import QtQuick.VirtualKeyboard |
| In C++: | QVirtualKeyboardSelectionListModel |
シグナル
- void activeItemChanged(int index)
- void itemSelected(int index)
方法
- void removeItem(int index)
- void selectItem(int index)
詳細説明
SelectionListModel は、入力メソッドによって提供される単語候補のデータモデルです。
SelectionListModel のインスタンスを直接作成することはできません。代わりに、InputEngine がインスタンスを管理し、InputEngine::wordCandidateListModel プロパティによってモデルへのアクセスを提供します。
このモデルは、リストデリゲートに対して以下のデータの役割を公開します:
display項目の表示テキスト。wordCompletionLength項目の単語補完長。dictionaryType単語の辞書タイプ。QVirtualKeyboardSelectionListModel::DictionaryType を参照。canRemoveSuggestion単語を辞書から削除できるかどうかを示すブール値。
activeItemChanged シグナルは、入力メソッドによって現在ハイライトされている項目を示します。ビューはこのシグナルに応答して、リスト内の対応する項目をハイライトする必要があります。
ユーザーの選択は、selectItem ()メソッドで処理される。ユーザがリストから項目を選択すると、ビューはこのメソッドを呼び出す必要があります。
シグナルのドキュメント
void activeItemChanged(int index)
このシグナルは、リスト内のアクティブなアイテムが変更されたときに発行される。UIはこのシグナルに反応して、リスト内のindex のアイテムをハイライトする必要があります。
注: 対応するハンドラはonActiveItemChanged です。
void itemSelected(int index)
このシグナルは、index のアイテムがユーザーによって選択されたときに発せられる。
注: 対応するハンドラはonItemSelected です。
メソッド・ドキュメント
void removeItem(int index)
このメソッドは、index の位置にある項目をユーザーがリストから削除するときに呼び出されなければならない。この削除は、さらなる処理のために input メソッドに転送されます。
void selectItem(int index)
このメソッドは、ユーザーがリストから位置index の項目を選択したときに呼び出されなければならない。この選択は、さらなる処理のために input メソッドに転送されます。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.