KeyboardLayoutLoader QML Type

키보드 레이아웃을 동적으로 로드할 수 있습니다. 더 보기...

Import Statement: import QtQuick.VirtualKeyboard.Components
Since: QtQuick.VirtualKeyboard 1.1
Inherits:

Loader

속성

방법

상세 설명

이 유형은 여러 페이지의 키로 구성된 키보드 레이아웃에 유용합니다.

컴포넌트를 컨테이너로 사용하여 단일 키보드 레이아웃(페이지)을 정의합니다. 그런 다음 소스 컴포넌트 속성을 다른 값으로 설정하여 활성 키보드 레이아웃을 변경할 수 있습니다.

예시:

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() 함수에 의해 생성된 입력 방법을 공유하는 레이아웃 이름 목록입니다.

목록이 비어 있으면(기본값) 입력 메서드는 다른 레이아웃과 공유되지 않으며 레이아웃이 변경되면 삭제됩니다.

목록에는 레이아웃 유형의 이름(예: ['기호'])만 포함되어야 합니다. 현재 레이아웃은 목록에 포함되지 않아도 됩니다.


메서드 문서

createInputMethod()

이 함수는 키보드 레이아웃에 의해 재정의되어 입력 메서드 객체를 동적으로 생성할 수 있습니다. 기본 구현은 호출을 하위 키보드 레이아웃으로 전달합니다.

이 함수에 의해 생성된 입력 메서드 객체는 특정 경우에 키보드 레이아웃 전환보다 오래 지속될 수 있습니다. 특히 sharedLayouts 속성에 나열된 레이아웃 간의 전환에 적용됩니다.


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