SHOW:
|
|
- or go back to the newest paste.
| 1 | - | else if (QToolButton* button = qobject_cast<QToolButton*>(w)) |
| 1 | + | else if (QToolButton* button = qobject_cast<QToolButton*>(w)) |
| 2 | - | {
|
| 2 | + | {
|
| 3 | - | if (!strTipText.isEmpty()) |
| 3 | + | if (!strTipText.isEmpty()) |
| 4 | - | strTipText.remove(QChar('&'));
|
| 4 | + | strTipText.remove(QChar('&'));
|
| 5 | ||
| 6 | - | icon = button->icon(); |
| 6 | + | icon = button->icon(); |
| 7 | - | QString str = button->text(); |
| 7 | + | QString str = button->text(); |
| 8 | - | str.remove(QChar('&'));
|
| 8 | + | str.remove(QChar('&'));
|
| 9 | - | if (strTipText != str) |
| 9 | + | if (strTipText != str) |
| 10 | - | strTitleText = str; |
| 10 | + | strTitleText = str; |
| 11 | ||
| 12 | - | QAction * defAction = button->defaultAction(); |
| 12 | + | QAction * defAction = button->defaultAction(); |
| 13 | - | if ( defAction ) |
| 13 | + | if ( defAction ) |
| 14 | - | {
|
| 14 | + | {
|
| 15 | - | QKeySequence keyShortcut = defAction->shortcut(); |
| 15 | + | QKeySequence keyShortcut = defAction->shortcut(); |
| 16 | - | QString strShortcutString = keyShortcut.toString(); |
| 16 | + | QString strShortcutString = keyShortcut.toString(); |
| 17 | - | strTitleText += " (" + strShortcutString + ")";
|
| 17 | + | strTitleText += " (" + strShortcutString + ")";
|
| 18 | - | } |
| 18 | + | } |
| 19 | - | } |
| 19 | + | } |