이 페이지에서

KeyboardLayout QML Type

키보드 배열. 더 보기...

Import Statement: import QtQuick.VirtualKeyboard.Components
Inherits:

ColumnLayout

속성

방법

상세 설명

이 유형은 키보드 레이아웃의 루트 요소입니다. 이 요소를 사용하여 새로운 키보드 레이아웃을 구성할 수 있습니다.

예시:

import QtQuick
import QtQuick.Layouts
import QtQuick.VirtualKeyboard

// file: layouts/en_GB/main.qml

KeyboardLayout {
    KeyboardRow {
        Key {
            key: Qt.Key_Q
            text: "q"
        }
        Key {
            key: Qt.Key_W
            text: "w"
        }
        Key {
            key: Qt.Key_E
            text: "e"
        }
        Key {
            key: Qt.Key_R
            text: "r"
        }
        Key {
            key: Qt.Key_T
            text: "t"
        }
        Key {
            key: Qt.Key_Y
            text: "y"
        }
    }
}

속성 설명

inputMethod : var

이 레이아웃에서 사용할 입력 방식을 설정합니다.

이 속성을 사용하면 이 레이아웃에서 사용자 정의 입력 방식을 사용할 수 있습니다.

inputMode : int

이 레이아웃에서 사용할 입력 모드를 설정합니다.

기본적으로 가상 키보드는 다른 키보드 레이아웃으로 전환할 때 현재 입력 모드를 유지하려고 시도합니다.

현재 입력 모드가 현재 상황에서 유효하지 않은 경우, 기본 입력 모드는 입력 방식에 의해 지정됩니다.

keyWeight : real

모든 자식 키에 대한 가중치를 설정합니다.

기본값은 레이아웃 계층 구조 내의 상위 요소로부터 상속됩니다.

sharedLayouts : var

createInputMethod() 함수에 의해 생성된 입력 방식을 공유하는 레이아웃 이름 목록입니다.

목록이 비어 있는 경우(기본값), 해당 입력 방식은 다른 레이아웃과 공유되지 않으며 레이아웃이 변경되면 삭제됩니다.

이 목록에는 레이아웃 유형의 이름만 포함되어야 합니다(예: ['symbols']). 현재 레이아웃은 목록에 포함될 필요가 없습니다.

smallTextVisible : bool [since QtQuick.VirtualKeyboard 2.0]

모든 자식 키에 대해 ` smallTextVisible `를 설정합니다.

기본값은 레이아웃 계층 구조 내의 상위 요소에서 상속됩니다.

이 속성은 QtQuick.VirtualKeyboard 2.0에서 도입되었습니다.

메서드 설명서

createInputMethod()

이 함수는 키보드 레이아웃에 의해 재정의되어 입력 방식 객체를 동적으로 생성할 수 있습니다. 기본 구현은 ` null`을 반환합니다.

이 함수에 의해 생성된 입력 방식 객체는 특정 경우 키보드 레이아웃 전환이 끝난 후에도 계속 유지될 수 있습니다. 특히, 이는 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.