KeyboardLayoutLoader QML Type
키보드 레이아웃을 동적으로 불러올 수 있습니다. 더 보기...
| Import Statement: | import QtQuick.VirtualKeyboard.Components |
| Since: | QtQuick.VirtualKeyboard 1.1 |
| Inherits: |
속성
- inputMethod : var
- inputMode : int
- sharedLayouts : var
방법
상세 설명
이 유형은 여러 페이지로 구성된 키보드 레이아웃에 유용합니다.
단일 키보드 레이아웃(한 페이지)은 컴포넌트를 컨테이너로 사용하여 정의됩니다. 그런 다음 sourceComponent 속성을 다른 값으로 설정하여 활성 키보드 레이아웃을 변경할 수 있습니다.
예시:
import QtQuick
import QtQuick.Layouts
import QtQuick.VirtualKeyboard
// file: layouts/en_GB/symbols.qml
KeyboardLayoutLoader {
property bool secondPage
onVisibleChanged: if (!visible) secondPage = false
sourceComponent: secondPage ? page2 : page1
Component {
id: page1
KeyboardLayout {
// Keyboard layout definition for page 1
}
}
Component {
id: page2
KeyboardLayout {
// Keyboard layout definition for page 2
}
}
}속성 설명
inputMethod : var
이 컨텍스트에 로드된 모든 키보드 레이아웃에 대한 입력 방식을 설정합니다.
입력 방식은 각 키보드 레이아웃별로 개별적으로 설정하거나, 이 컨텍스트 전체에 공통적으로 설정할 수 있습니다. 개별적으로 설정된 경우에는 이 속성을 수정해서는 안 됩니다.
inputMode : int
이 컨텍스트에 로드된 모든 키보드 레이아웃에 대한 입력 모드를 설정합니다.
입력 모드는 각 키보드 레이아웃별로 개별적으로 설정하거나, 이 컨텍스트 전체에 공통적으로 설정할 수 있습니다. 개별적으로 설정된 경우, 이 속성을 수정해서는 안 됩니다.
sharedLayouts : var
createInputMethod() 함수에 의해 생성된 입력 방식을 공유하는 레이아웃 이름 목록입니다.
목록이 비어 있는 경우(기본값), 해당 입력 방식은 다른 레이아웃과 공유되지 않으며 레이아웃이 변경되면 소멸됩니다.
이 목록에는 레이아웃 유형의 이름만 포함되어야 합니다(예: ['symbols']). 현재 레이아웃은 목록에 포함될 필요가 없습니다.
메서드 설명
createInputMethod()
이 함수는 키보드 레이아웃에 의해 재정의되어 입력 방식 객체를 동적으로 생성할 수 있습니다. 기본 구현은 호출을 하위 키보드 레이아웃으로 전달합니다.
이 함수로 생성된 입력 방식 객체는 특정 경우 키보드 레이아웃 전환 후에도 계속 유지될 수 있습니다. 특히, 이는 sharedLayouts 속성에 나열된 레이아웃 간의 전환에 적용됩니다.
© 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.