SelectionListModel QML Type

선택 목록에 대한 데이터 모델을 제공합니다. 자세히...

Import Statement: import QtQuick.VirtualKeyboard
In C++: QVirtualKeyboardSelectionListModel

신호

방법

상세 설명

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 위치에 있는 항목을 제거할 때 호출해야 합니다. 제거는 추가 처리를 위해 입력 메서드로 전달됩니다.


void selectItem(int index)

이 메서드는 사용자가 목록에서 index 위치에 있는 항목을 선택할 때 호출되어야 합니다. 선택 항목은 추가 처리를 위해 입력 메서드로 전달됩니다.


© 2025 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.