이 페이지에서

QVirtualKeyboardInputContext Class

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

헤더: #include <QVirtualKeyboardInputContext>
CMake: find_package(Qt6 REQUIRED COMPONENTS VirtualKeyboard)
target_link_libraries(mytarget PRIVATE Qt6::VirtualKeyboard)
qmake: QT += virtualkeyboard
QML에서: InputContext
상속: QObject

속성

공개 함수

int anchorPosition() const
bool anchorRectIntersectsClipRect() const
QRectF anchorRectangle() const
void clear()
void commit()
void commit(const QString &text, int replaceFrom = 0, int replaceLength = 0)
int cursorPosition() const
bool cursorRectIntersectsClipRect() const
QRectF cursorRectangle() const
QVirtualKeyboardInputEngine *inputEngine() const
Qt::InputMethodHints inputMethodHints() const
bool isAnimating() const
bool isCapsLockActive() const
bool isSelectionControlVisible() const
bool isShiftActive() const
bool isUppercase() const
QVirtualKeyboardObserver *keyboardObserver() const
QString locale() const
QString preeditText() const
QString selectedText() const
void sendKeyClick(int key, const QString &text, int modifiers = 0)
void setAnimating(bool isAnimating)
void setPreeditText(const QString &text, QList<QInputMethodEvent::Attribute> attributes = QList<QInputMethodEvent::Attribute>(), int replaceFrom = 0, int replaceLength = 0)
QString surroundingText() const

신호

상세 설명

속성 설명

[read-only] anchorPosition : int

이 속성은 앵커 위치를 저장합니다.

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

액세스 함수:

int anchorPosition() const

알림 신호:

void anchorPositionChanged()

[read-only] anchorRectIntersectsClipRect : bool

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

액세스 함수:

bool anchorRectIntersectsClipRect() const

알림 신호:

void anchorRectIntersectsClipRectChanged()

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

[read-only] anchorRectangle : QRectF

이 속성은 앵커 사각형을 저장합니다.

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

액세스 함수:

QRectF anchorRectangle() const

알림 신호:

void anchorRectangleChanged()

animating : bool

이 속성은 애니메이션 진행 상태를 저장합니다.

UI 전환 상태와 같은 상황에서 애니메이션 상태를 설정하려면 이 속성을 사용하십시오.

액세스 함수:

bool isAnimating() const
void setAnimating(bool isAnimating)

Notifier 신호:

void animatingChanged()

[read-only] capsLockActive : bool

이 속성은 캡스 락 상태를 저장합니다.

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

액세스 함수:

bool isCapsLockActive() const

알림 신호:

[read-only] cursorPosition : int

이 속성은 커서 위치를 저장합니다.

커서 위치가 변경되면 이 속성도 변경됩니다.

액세스 함수:

int cursorPosition() const

알림 신호:

void cursorPositionChanged()

[read-only] cursorRectIntersectsClipRect : bool

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

액세스 함수:

bool cursorRectIntersectsClipRect() const

알림 신호:

void cursorRectIntersectsClipRectChanged()

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

[read-only] cursorRectangle : QRectF

이 속성은 커서 사각형을 저장합니다.

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

액세스 함수:

QRectF cursorRectangle() const

알림 신호:

void cursorRectangleChanged()

[read-only] inputEngine : QVirtualKeyboardInputEngine* const

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

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

액세스 함수:

QVirtualKeyboardInputEngine *inputEngine() const

[read-only] inputMethodHints : Qt::InputMethodHints

이 속성은 입력 방식 힌트를 저장합니다.

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

액세스 함수:

Qt::InputMethodHints inputMethodHints() const

알림 신호:

void inputMethodHintsChanged()

[read-only, since 6.1] keyboardObserver : QVirtualKeyboardObserver* const

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

이 열거형은 Qt 6.1에서 도입되었습니다.

액세스 함수:

QVirtualKeyboardObserver *keyboardObserver() const

[read-only] locale : QString

이 속성은 로케일을 저장합니다.

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

액세스 함수:

QString locale() const

알림 신호:

void localeChanged()

preeditText : QString

이 속성은 편집 전 텍스트를 저장합니다.

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

액세스 함수:

QString preeditText() const
void setPreeditText(const QString &text, QList<QInputMethodEvent::Attribute> attributes = QList<QInputMethodEvent::Attribute>(), int replaceFrom = 0, int replaceLength = 0)

알림 신호:

void preeditTextChanged()

[read-only] selectedText : QString

이 속성은 선택된 텍스트를 저장합니다.

이 속성은 선택된 텍스트가 변경되면 함께 변경됩니다.

액세스 함수:

QString selectedText() const

알림 신호:

void selectedTextChanged()

[read-only] selectionControlVisible : bool

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

액세스 함수:

bool isSelectionControlVisible() const

알림 신호:

void selectionControlVisibleChanged()

[read-only] shiftActive : bool

이 속성은 교대 근무 상태를 나타냅니다.

교대 근무 상태가 변경되면 이 속성도 변경됩니다.

액세스 함수:

bool isShiftActive() const

알림 신호:

[read-only] surroundingText : QString

이 속성은 커서 주변의 텍스트를 저장합니다.

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

액세스 함수:

QString surroundingText() const

알림 신호:

void surroundingTextChanged()

[read-only] uppercase : bool

이 속성은 대문자 여부를 나타냅니다.

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

액세스 함수:

bool isUppercase() const

알림 신호:

void uppercaseChanged()

멤버 함수 설명서

[invokable] void QVirtualKeyboardInputContext::clear()

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

참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.

[invokable] void QVirtualKeyboardInputContext::commit()

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

참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.

[invokable] void QVirtualKeyboardInputContext::commit(const QString &text, int replaceFrom = 0, int replaceLength = 0)

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

참고: 이 함수는 메타 객체 시스템 및 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.

[invokable] void QVirtualKeyboardInputContext::sendKeyClick(int key, const QString &text, int modifiers = 0)

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

참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하십시오.

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