QVirtualKeyboardInputContext Class▲
-
Header: QVirtualKeyboardInputContext
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS VirtualKeyboard)
target_link_libraries(mytarget PRIVATE Qt6::VirtualKeyboard)
-
qmake: QT += virtualkeyboard
-
Inherited By:
-
Instantiated By: qml-qtquick-virtualkeyboard-inputcontext.xml
-
Inherits: QObject
-
Group: QVirtualKeyboardInputContext is part of qtvirtualkeyboard-cpp-for-devs
Detailed Description▲
Property Documentation▲
[read-only] anchorPosition : const int▲
This property holds the anchor position.
This property is changed when the anchor position changes.
Access functions:
-
int anchorPosition() const
Notifier signal:
-
void anchorPositionChanged()
[read-only] anchorRectIntersectsClipRect : const bool▲
Holds true if the bounding rectangle of the selection anchor intersects the exposed input item rectangle.
Access functions:
-
bool anchorRectIntersectsClipRect() const
Notifier signal:
-
void anchorRectIntersectsClipRectChanged()
See Also▲
[read-only] anchorRectangle : const QRectF▲
This property holds the anchor rectangle.
This property is changed when the anchor rectangle changes.
Access functions:
-
anchorRectangle() const
Notifier signal:
-
void anchorRectangleChanged()
animating : bool▲
This property holds the animating status.
Use this property to set the animating status, for example during UI transitioning states.
Access functions:
-
bool isAnimating() const
-
void setAnimating(bool isAnimating)
Notifier signal:
-
void animatingChanged()
[read-only] capsLockActive : const bool▲
This property holds the caps lock status.
This property is changed when the caps lock status changes.
Access functions:
-
bool isCapsLockActive() const
Notifier signal:
-
void capsLockActiveChanged()
[read-only] cursorPosition : const int▲
This property holds the cursor position.
This property is changed when the cursor position changes.
Access functions:
-
int cursorPosition() const
Notifier signal:
-
void cursorPositionChanged()
[read-only] cursorRectIntersectsClipRect : const bool▲
Holds true if the bounding rectangle of the input cursor intersects the exposed input item rectangle.
Access functions:
-
bool cursorRectIntersectsClipRect() const
Notifier signal:
-
void cursorRectIntersectsClipRectChanged()
See Also▲
[read-only] cursorRectangle : const QRectF▲
This property holds the cursor rectangle.
This property is changed when the cursor rectangle changes.
Access functions:
-
cursorRectangle() const
Notifier signal:
-
void cursorRectangleChanged()
[read-only] inputEngine : QVirtualKeyboardInputEngine* const▲
This property holds the input engine.
This property stores the input engine.
Access functions:
-
*inputEngine() const
[read-only] inputMethodHints : const Qt::InputMethodHints▲
This property holds the input method hints.
This property is changed when the input method hints changes.
Access functions:
-
inputMethodHints() const
Notifier signal:
-
void inputMethodHintsChanged()
[read-only, since QtQuick.VirtualKeyboard 6.1] keyboardObserver : QVirtualKeyboardObserver* const▲
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.
Access functions:
-
*keyboardObserver() const
[read-only] locale : const QString▲
This property holds the locale.
This property is changed when the input locale changes.
Access functions:
-
locale() const
Notifier signal:
-
void localeChanged()
preeditText : QString▲
This property holds the pre-edit text.
This property sets the pre-edit text.
Access functions:
-
preeditText() const
-
void setPreeditText(const &text, <> attributes = QList<QInputMethodEvent::Attribute>(), int replaceFrom = 0, int replaceLength = 0)
Notifier signal:
-
void preeditTextChanged()
[read-only] selectedText : const QString▲
This property holds the selected text.
This property is changed when the selected text changes.
Access functions:
-
selectedText() const
Notifier signal:
-
void selectedTextChanged()
[read-only] selectionControlVisible : const bool▲
Holds true if the selection control is currently visible.
Access functions:
-
bool isSelectionControlVisible() const
Notifier signal:
-
void selectionControlVisibleChanged()
[read-only] shiftActive : const bool▲
This property holds the shift status.
This property is changed when the shift status changes.
Access functions:
-
bool isShiftActive() const
Notifier signal:
-
void shiftActiveChanged()
[read-only] surroundingText : const QString▲
This property holds the surrounding text around cursor.
This property is changed when the surrounding text around the cursor changes.
Access functions:
-
surroundingText() const
Notifier signal:
-
void surroundingTextChanged()
[read-only] uppercase : const bool▲
This property holds the uppercase status.
This property is true when either shiftActive or capsLockActive is true.
Access functions:
-
bool isUppercase() const
Notifier signal:
-
void uppercaseChanged()
Member Function Documentation▲
void QVirtualKeyboardInputContext::clear()▲
Clears the pre-edit text.
void QVirtualKeyboardInputContext::commit()▲
Commits the current pre-edit text.
void QVirtualKeyboardInputContext::commit(const QString &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.
void QVirtualKeyboardInputContext::sendKeyClick(int key, const QString &text, int modifiers = 0)▲
Sends a key click event with the given key, text and modifiers to the input item that currently has focus.
Obsolete Members for QVirtualKeyboardInputContext▲
The following members of class QVirtualKeyboardInputContext are deprecated. We strongly advise against using them in new code.
Obsolete Property Documentation▲
[read-only] capsLock : const bool▲
This property is deprecated. We strongly advise against using it in new code.
This property holds the caps lock status.
Use capsLockActive instead.
This property is changed when the caps lock status changes.
Access functions:
-
bool isCapsLockActive() const
Notifier signal:
-
void capsLockActiveChanged()
[read-only] inputItem : QObject* const▲
This property is deprecated. We strongly advise against using it in new code.
This property holds the focused input item.
This property is changed when the focused input item changes.
Access functions:
-
*inputItem() const
Notifier signal:
-
void inputItemChanged()
[read-only] shift : const bool▲
This property is deprecated. We strongly advise against using it in new code.
This property holds the shift status.
Use shiftActive instead.
This property is changed when the shift status changes.
Access functions:
-
bool isShiftActive() const
Notifier signal:
-
void shiftActiveChanged()