1 /****************************************************************************
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
6 ** This file is part of the documentation of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:FDL$
9 ** GNU Free Documentation License
10 ** Alternatively, this file may be used under the terms of the GNU Free
11 ** Documentation License version 1.3 as published by the Free Software
12 ** Foundation and appearing in the file included in the packaging of
16 ** Alternatively, this file may be used in accordance with the terms
17 ** and conditions contained in a signed written agreement between you
26 ****************************************************************************/
29 \page qtquick-input-topic.html
30 \title Important Concepts In Qt Quick - User Input
31 \brief Overview of user input concepts
33 Being able to respond to user-input is a fundamental part of user-interface
34 design. Depending on the use-case that an application solves, and the
35 form-factor of the device that the application runs on, the best way
36 to receive user-input may be different.
40 Allowing users to physically touch a screen to interact with an application is
41 a popular user-interface paradigm on portable devices like smartphones and
44 Qt Quick was designed specifically with touch-driven user-interfaces in mind,
45 and thus touch events are supported in various visual object types, from
46 \l{Flickable} lists to the generic \l{MultiPointTouchArea} type, as well as
47 in the \l{MouseArea} type (which will be documented thoroughly in a proceeding
53 Mouse input is another important user input for user interfaces. Detecting
54 and reacting to clicks and presses according to the mouse cursor position is a fundamental
55 concept in user-interface design.
57 Qt Quick provides the MouseArea visual object type which automatically receives
58 mouse events (including clicks and wheel events) which allows developers to
59 create custom user-interface objects to handle mouse input. Please see the
60 documentation about \l{qtquick-input-mouseevents.html}
61 {mouse events in Qt Quick} for more information on the topic.
64 \section1 Keyboard Input and Keyboard Focus
66 Supporting input from a keyboard is a vital component of the user interface of
69 Any visual item can receive keyboard input through the \l Keys attached type.
70 Additionally, the issue of \e {keyboard focus} arises when multiple items
71 are required to receive key events, as these events must be passed to the
72 correct item. See the documentation about \l{Keyboard focus in Qt Quick} for more
73 information on this topic.
75 Qt Quick also provides visual text items which automatically receive keyboard
76 events and key-presses, and displays the appropriate text. See the
77 documentation about \l{qtquick-input-textinput.html}{text input} for
78 in-depth information on the topic.
81 \section1 Device Motion Gestures
83 Detecting device gestures with an accelerometer, or through camera-based gesture
84 recognition, can allow users to interact with an application without requiring
85 their full and undevided attention. It can also provide a more interactive
86 and engaging experience.
88 Qt Quick itself does not offer first-class support for physical device motion gestures;
89 however, the \l{Qt Sensors} module provides QML types with support for such gestures.
90 See the \l{Qt Sensors} module documentation for more information on the topic.