이 페이지에서

InputContext QML Type (Singleton)

입력 컨텍스트에 대한 액세스를 제공합니다. 더 보기...

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

참고: 이 타입은 QML 싱글톤입니다. QML 엔진에는 이 타입의 인스턴스가 단 하나만 존재합니다.

속성

방법

상세 설명

InputContext는 싱글톤 인스턴스로 액세스할 수 있습니다.

속성 설명

anchorPosition : int [read-only, since QtQuick.VirtualKeyboard 2.2]

이 속성은 앵커 위치가 변경될 때 변경됩니다.

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

anchorRectIntersectsClipRect : bool [read-only]

선택 앵커의 경계 사각형이 노출된 입력 항목 사각형과 교차하는 경우 true 를 반환합니다.

Qt::ImAnchorRectangle 및 Qt::ImInputItemClipRectangle도 참조하십시오 .

anchorRectangle : rect [read-only, since QtQuick.VirtualKeyboard 2.1]

이 속성은 앵커 사각형이 변경될 때 변경됩니다.

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

animating : bool

이 속성을 사용하여, 예를 들어 UI 전환 상태와 같은 상황에서 애니메이션 상태를 설정할 수 있습니다.

capsLockActive : bool [read-only, since QtQuick.VirtualKeyboard 2.4]

이 속성은 캡스 락 상태가 변경될 때 변경됩니다.

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

cursorPosition : int [read-only]

이 속성은 커서 위치가 변경될 때 변경됩니다.

cursorRectIntersectsClipRect : bool [read-only]

입력 커서의 경계 사각형이 노출된 입력 항목의 사각형과 교차하는 경우 true 를 반환합니다.

Qt::ImCursorRectangle 및 Qt::ImInputItemClipRectangle도 참조하십시오 .

cursorRectangle : rect [read-only]

이 속성은 커서 사각형이 변경될 때 변경됩니다.

inputEngine : InputEngine [read-only]

이 속성은 입력 엔진을 저장합니다.

inputMethodHints : int [read-only]

이 속성은 입력 방식 힌트가 변경될 때 변경됩니다.

keyboardObserver : KeyboardObserver [read-only, since 6.1]

키보드 변경 이벤트에 대한 알림을 수신하는 데 사용할 수 있는 키보드 관찰자 객체를 보관합니다.

이 속성은 Qt 6.1에서 도입되었습니다.

locale : string [read-only]

이 속성은 입력 로케일이 변경되면 변경됩니다.

preeditText : string

이 속성은 편집 전 텍스트를 설정합니다.

selectedText : string [read-only]

이 속성은 선택된 텍스트가 변경될 때 변경됩니다.

selectionControlVisible : bool [read-only]

선택 컨트롤이 현재 표시되어 있는 경우 ` true `를 반환합니다.

shiftActive : bool [read-only, since QtQuick.VirtualKeyboard 2.4]

이 속성은 시프트 상태가 변경될 때 변경됩니다.

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

surroundingText : string [read-only]

이 속성은 커서 주변의 텍스트가 변경될 때 변경됩니다.

uppercase : bool [read-only, since QtQuick.VirtualKeyboard 2.2]

shiftActive 또는 capsLockActive 중 하나가 true 일 때, 이 속성은 true 입니다.

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

메서드 문서

void clear()

편집 전 텍스트를 지웁니다.

void commit()

현재 편집 전 텍스트를 커밋합니다.

void commit(string text, int replaceFrom = 0, int replaceLength = 0)

입력 항목에 최종 ` text `을 적용하고, 선택적으로 편집 전 텍스트의 시작 지점을 기준으로 텍스트를 수정합니다. `replaceFrom `이 0이 아닌 경우, ` text `은 `replaceFrom` 을 기준으로 `replaceLength` 길이의 내용을 대체합니다.

void sendKeyClick(int key, string text, int modifiers = 0)

현재 포커스가 있는 입력 항목에 지정된 키 클릭 이벤트( key, text, modifiers )를 전송합니다.

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