diff options
author | Liang Qi <liang.qi@digia.com> | 2013-02-22 13:44:06 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-12 02:27:29 +0100 |
commit | 2f9d0346f00e37725f0f1bce1318501a25c5e438 (patch) | |
tree | 24060fe2777ada4a054cb0c82e5bf89c28ffa70a /src/quick/items/qquickitem.h | |
parent | b4673e69a0522fca9c592f1dab1734738b1443a8 (diff) |
Support activeFocusOnTab in QQuickItem
Add activeFocusOnTab as property to QQuickItem. Setting the
property allows automatic keyboard navigation between all
elements that have it set.
This key event handler will only be called after the QML key
handlers, such as KeyNavigation and Keys, and the C++ key
event handlers, such as keyPressEvent function.
Algorithm is most done by Frederik Gladhorn, in cooperation with
Gabriel de Dietrich.
Done-with: Frederik Gladhorn <frederik.gladhorn@digia.com>
Done-with: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Change-Id: I8b58be9c20d113661fe85d27bdb1af84340d9de5
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src/quick/items/qquickitem.h')
-rw-r--r-- | src/quick/items/qquickitem.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquickitem.h b/src/quick/items/qquickitem.h index 71681698b9..c37bc10bdd 100644 --- a/src/quick/items/qquickitem.h +++ b/src/quick/items/qquickitem.h @@ -132,6 +132,7 @@ class Q_QUICK_EXPORT QQuickItem : public QObject, public QQmlParserStatus Q_PROPERTY(bool focus READ hasFocus WRITE setFocus NOTIFY focusChanged FINAL) Q_PROPERTY(bool activeFocus READ hasActiveFocus NOTIFY activeFocusChanged FINAL) + Q_PROPERTY(bool activeFocusOnTab READ activeFocusOnTab WRITE setActiveFocusOnTab NOTIFY activeFocusOnTabChanged FINAL) Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged) Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged) @@ -261,6 +262,9 @@ public: bool smooth() const; void setSmooth(bool); + bool activeFocusOnTab() const; + void setActiveFocusOnTab(bool); + bool antialiasing() const; void setAntialiasing(bool); @@ -345,6 +349,7 @@ Q_SIGNALS: void stateChanged(const QString &); void focusChanged(bool); void activeFocusChanged(bool); + void activeFocusOnTabChanged(bool); void parentChanged(QQuickItem *); void transformOriginChanged(TransformOrigin); void smoothChanged(bool); |