Skip to content
Snippets Groups Projects
Commit 6e3c7cdd authored by Yuya Nishihara's avatar Yuya Nishihara
Browse files

Leverage QQuickMenuItem::shortcut() to get mnemonic key

parent a869fc3e
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ void HackedMenu::handleKeyPress(const QKeySequence &seq) ...@@ -56,7 +56,7 @@ void HackedMenu::handleKeyPress(const QKeySequence &seq)
auto *item = qobject_cast<QQuickMenuItem *>(itemAt(index)); auto *item = qobject_cast<QQuickMenuItem *>(itemAt(index));
if (!item) if (!item)
continue; continue;
if (QKeySequence::mnemonic(item->text()) == seq) { if (item->shortcut() == seq) {
if (nextIndex < 0) if (nextIndex < 0)
nextIndex = index; nextIndex = index;
prevIndex = index; prevIndex = index;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment