- 
    
Bug
 - 
    Resolution: Invalid
 - 
    
P3: Somewhat important
 - 
    None
 - 
    4.7.3
 
In the following example, shortcut is not working because setText() function overwrites the already defined shortcut:
QToolButton *pToolButton = new QToolButton; pToolButton->setShortcut(QKeySequence::Find); pToolButton->setText("Test");
Can be reproduced at least with QToolButton and QPushButton.
The following works as setShortcut() function is used after setText() function:
QToolButton *pToolButton = new QToolButton; pToolButton->setText("Test"); pToolButton->setShortcut(QKeySequence::Find);
This is a problem when the button texts are translated dynamically because the already defined shortcut is removed.
Please see the attached zip file for an example project.