PDA

View Full Version : F1 shortcut



lsbts1291
30th January 2014, 12:52
Hi,

i want to connect in a modal dialog the F1 key to help button of a QDialogButtonBox. But if I press the F1 key the button is not activated. In the application this is the only object (button or action) connected with the F1 shortcut. Where is the error?



MyDialog:: MyDialog(QWidget *parent) : QDialog(parent), ui(new Ui:: MyDialog)
{
ui->setupUi(this);
QPushButton *helpButton = ui->buttonBox->button(QDialogButtonBox::Help);
helpButton->setShortcut(QKeySequence::HelpContents);
}