diff options
author | Shawn Rutledge <shawn.rutledge@theqtcompany.com> | 2015-08-07 10:52:36 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@theqtcompany.com> | 2015-09-03 08:18:20 +0000 |
commit | 8b09653cb22807f09ec4e6c0ffc7dcf7f11bc1a0 (patch) | |
tree | 0d9e717ce1b2874d7a29da0df002980b0955c481 /src/quick/util/qquickutilmodule.cpp | |
parent | 149ece7a0cfb4fc90fe4544379ee2772fde881fd (diff) |
Shortcut: add sequenceString property
If you set sequence to a StandardKey, then read back the property,
you will get an int, which is not suitable for display.
Now you can use sequenceString for tooltips, preference dialogs
for setting shortcuts, and such.
[ChangeLog][QtQuick] Added Shortcut.sequenceString property to read
back the key sequence as a displayable string
Change-Id: I63ee46f8a2c2da1b1c803282baa894fb1667fe67
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/quick/util/qquickutilmodule.cpp')
-rw-r--r-- | src/quick/util/qquickutilmodule.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/util/qquickutilmodule.cpp b/src/quick/util/qquickutilmodule.cpp index 4f6e49fa7a..0af2343504 100644 --- a/src/quick/util/qquickutilmodule.cpp +++ b/src/quick/util/qquickutilmodule.cpp @@ -114,4 +114,6 @@ void QQuickUtilModule::defineModule() qmlRegisterType<QQuickTextMetrics>("QtQuick", 2, 4, "TextMetrics"); qmlRegisterType<QQuickShortcut>("QtQuick", 2, 5, "Shortcut"); + + qmlRegisterType<QQuickShortcut,1>("QtQuick", 2, 6, "Shortcut"); } |