use auto mnemonics for common widgets as buttons,
checkboxes and tabs
A feature similar to KXMLGui apps
Details
- Reviewers
- None
- Group Reviewers
Plasma - Commits
- R858:cdaa40c64413: experimental support for auto mnemonics
tested in kirigami gallery
Diff Detail
- Repository
- R858 Qt Quick Controls 2: Desktop Style
- Branch
- mart/mnemonics
- Lint
No Linters Available - Unit
No Unit Test Coverage
org.kde.desktop/ToolButton.qml | ||
---|---|---|
36 | Btw probably Qt.styleHints.hasOwnProperty("useHoverEffects") ? Qt.styleHints.useHoverEffects : true |
org.kde.desktop/Button.qml | ||
---|---|---|
43 | hm, yeah, will be terrible :/ |
org.kde.desktop/Button.qml | ||
---|---|---|
43 | eww, even worse, in Qt 5.10 the mnemonics are removed in setText so is impossible to know what the original text was /o\ |
org.kde.desktop/Button.qml | ||
---|---|---|
43 | which, they noticed it was terrible and reverted in Qt 5.11, but 5.10 is still meh, so the best i can do is to do something that fully correctly works only on 5.11 :/ |
How heavy will be all these Shortcut instances? Is that a lot of QObjects?
Otherwise it looks pretty good.
yeah, it's many qobjects, but there aren't other ways to do shortcuts without it (the way to directly do shortcuts even in c++ it's completely private api)
yeah, it's many qobjects, but there aren't other ways to do shortcuts without it (the way to directly do shortcuts even in c++ it's completely private api)
Not even event filtering or something?
A shortcut is registered by the Shortcut item by doing
QGuiApplicationPrivate::instance()->shortcutMap.addShortcut(this, shortcut.keySequence, context, *ctxMatcher());
QShortcut is in widgets and also another QObject. I don't see a way to do that using public API. QShortcutMap is in gui and exported but marked "internal".
We could have a global Shortcut that registers everythign and propagates it along but that would make things utterly complicated and ugly.
Big +1, missed it earlier.
Won't upstream QQC2 come up with something in this regard?
org.kde.desktop/Button.qml | ||
---|---|---|
43 | So, it has landed, and it is still broken with respect to &&. I filed a bug report about it: https://bugs.kde.org/show_bug.cgi?id=454778 |