InputContext QML Type | Qt Virtual Keyboard (original) (raw)
Provides access to an input context. More...
Properties
- anchorPosition : int
(since QtQuick.VirtualKeyboard 2.2)
- anchorRectIntersectsClipRect : bool
- anchorRectangle : rect
(since QtQuick.VirtualKeyboard 2.1)
- animating : bool
- capsLockActive : bool
(since QtQuick.VirtualKeyboard 2.4)
- cursorPosition : int
- cursorRectIntersectsClipRect : bool
- cursorRectangle : rect
- inputEngine : InputEngine
- inputMethodHints : int
- keyboardObserver : KeyboardObserver
(since QtQuick.VirtualKeyboard 6.1)
- locale : string
- preeditText : string
- selectedText : string
- selectionControlVisible : bool
- shiftActive : bool
(since QtQuick.VirtualKeyboard 2.4)
- surroundingText : string
- uppercase : bool
(since QtQuick.VirtualKeyboard 2.2)
Methods
- void clear()
- void commit()
- void commit(string text, int replaceFrom, int replaceLength)
- void sendKeyClick(int key, string text, int modifiers)
Detailed Description
The InputContext can be accessed as singleton instance.
Property Documentation
anchorPosition : int [read-only, since QtQuick.VirtualKeyboard 2.2]
This property is changed when the anchor position changes.
This property was introduced in QtQuick.VirtualKeyboard 2.2.
anchorRectIntersectsClipRect : bool [read-only]
anchorRectangle : rect [read-only, since QtQuick.VirtualKeyboard 2.1]
This property is changed when the anchor rectangle changes.
This property was introduced in QtQuick.VirtualKeyboard 2.1.
Use this property to set the animating status, for example during UI transitioning states.
capsLockActive : bool [read-only, since QtQuick.VirtualKeyboard 2.4]
This property is changed when the caps lock status changes.
This property was introduced in QtQuick.VirtualKeyboard 2.4.
cursorPosition : int [read-only]
This property is changed when the cursor position changes.
cursorRectIntersectsClipRect : bool [read-only]
cursorRectangle : rect [read-only]
This property is changed when the cursor rectangle changes.
This property stores the input engine.
inputMethodHints : int [read-only]
This property is changed when the input method hints changes.
keyboardObserver : KeyboardObserver [read-only, since QtQuick.VirtualKeyboard 6.1]
Holds the keyboard observer object, which can be used to receive notifications of keyboard change events.
This property was introduced in QtQuick.VirtualKeyboard 6.1.
This property is changed when the input locale changes.
This property sets the pre-edit text.
selectedText : string [read-only]
This property is changed when the selected text changes.
selectionControlVisible : bool [read-only]
Holds true
if the selection control is currently visible.
shiftActive : bool [read-only, since QtQuick.VirtualKeyboard 2.4]
This property is changed when the shift status changes.
This property was introduced in QtQuick.VirtualKeyboard 2.4.
surroundingText : string [read-only]
This property is changed when the surrounding text around the cursor changes.
uppercase : bool [read-only, since QtQuick.VirtualKeyboard 2.2]
This property is true
when either shiftActive or capsLockActive is true
.
This property was introduced in QtQuick.VirtualKeyboard 2.2.
Method Documentation
Clears the pre-edit text.
Commits the current pre-edit text.
void commit(string text, int replaceFrom = 0, int replaceLength = 0)
Commits the final text to the input item and optionally modifies the text relative to the start of the pre-edit text. If replaceFrom is non-zero, the text replaces the contents relative to replaceFrom with a length of replaceLength.
Sends a key click event with the given key, text and modifiers to the input item that currently has focus.
© 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.