diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-05-14 03:32:49 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-05-14 03:32:49 (GMT) |
commit | bea52aaaaf188293a5e235d5b5f96b386efba5ac (patch) | |
tree | 779458f9465af791d76ddd6b2e4c70aa33f22238 /tests/auto/declarative/qdeclarativeitem/data | |
parent | 1e395c0ab9676995419ae8b20e4d95ad3fe11f31 (diff) | |
download | Qt-bea52aaaaf188293a5e235d5b5f96b386efba5ac.zip Qt-bea52aaaaf188293a5e235d5b5f96b386efba5ac.tar.gz Qt-bea52aaaaf188293a5e235d5b5f96b386efba5ac.tar.bz2 |
Add a "priority" property to Keys and KeyNavigation
Allows intercepting keys before or after normal item key processing.
Task-number: QTBUG-10467
Diffstat (limited to 'tests/auto/declarative/qdeclarativeitem/data')
-rw-r--r-- | tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml b/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml new file mode 100644 index 0000000..171536b --- /dev/null +++ b/tests/auto/declarative/qdeclarativeitem/data/keyspriority.qml @@ -0,0 +1,9 @@ +import Qt 4.7 +import Test 1.0 + +KeyTestItem { + focus: true + Keys.onPressed: keysTestObject.keyPress(event.key, event.text, event.modifiers) + Keys.onReleased: { keysTestObject.keyRelease(event.key, event.text, event.modifiers); event.accepted = true; } + Keys.priority: keysTestObject.processLast ? Keys.AfterItem : Keys.BeforeItem +} |