diff options
author | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2017-09-20 14:12:33 +0200 |
---|---|---|
committer | Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> | 2017-09-21 10:49:27 +0000 |
commit | 27df0d34644ffc553972641abfd3406219c85391 (patch) | |
tree | 95bf11cba8397a513707350265aba9190171d030 | |
parent | 1f72424b80ac1b84b4f040f195d74d9f2b646a62 (diff) |
Doc: Update documentation for the examplev5.10.0-beta2v5.10.0-beta1
Task-number: QTBUG-60664
Change-Id: Ic3a55919c9f2fa2c07bc4cdc98dec3ed9aba72d0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r-- | src/virtualkeyboard/doc/src/qtvirtualkeyboard-examples.qdoc | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/src/virtualkeyboard/doc/src/qtvirtualkeyboard-examples.qdoc b/src/virtualkeyboard/doc/src/qtvirtualkeyboard-examples.qdoc index 61b11d26..ef2bf69f 100644 --- a/src/virtualkeyboard/doc/src/qtvirtualkeyboard-examples.qdoc +++ b/src/virtualkeyboard/doc/src/qtvirtualkeyboard-examples.qdoc @@ -40,7 +40,44 @@ \ingroup qtvirtualkeyboard-examples \image basic-example.png - The example shows how to build a virtual keyboard UI with support for - multiple keyboard layouts using QML, and a QPlatformInputContext bridge - for communicating between the keyboard and focused text editor in C++. + The example has two implementations: one for the desktop + platforms and another for the embedded platforms. The former version + enables text input into several text fields using the virtual keyboard, + whereas the latter version uses the same UI but with a custom virtual + keyboard InputPanel. The following snippet from + \c basic.pro shows how the qmake project is set up to choose the + appropriate implementation based on the CONFIG options: + + \quotefromfile basic/basic.pro + \skipto android-embedded + \printuntil /^\}$/ + + The example enables the virtual keyboard by setting the \c QT_IM_MODULE + environment variable before loading the \c .qml file: + + \quotefromfile basic/main.cpp + \skipto #include + \printuntil } + + Besides this, it uses custom TextField and TextArea items to configure the + \e[ENTER] key behavior using the EnterKeyAction attached property. + + \quotefromfile basic/Basic.qml + \skipto import + \printuntil Rectangle + \dots + \skipto TextField + \printuntil } + \dots + \skipto TextArea + \printuntil } + \skipto /^\}$/ + \printuntil } + + The TextField and TextArea are inherited from the TextBase custom type, + which has \c enterKeyEnabled, \c enterKeyText, and \c enterKeyAction + properties. The TextField and TextArea instances in the snippet can + set these properties to change the default behavior. + + \include examples-run.qdocinc */ |