Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if (QToolButton* button = qobject_cast<QToolButton*>(w))
- {
- if (!strTipText.isEmpty())
- strTipText.remove(QChar('&'));
- icon = button->icon();
- QString str = button->text();
- str.remove(QChar('&'));
- if (strTipText != str)
- strTitleText = str;
- //////////////////////////
- //////////// THIS IS NEW
- QAction * defAction = button->defaultAction();
- if ( defAction )
- {
- QKeySequence keyShortcut = defAction->shortcut();
- QString strShortcutString = keyShortcut.toString();
- strTitleText += " (" + strShortcutString + ")";
- }
- //////////// THIS IS NEW
- //////////////////////////
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement