It could be an ambiguous shortcut. A QShortcut seems the have the "window" context by default. Also, the correct signal seems to be activated, not triggered.. sorry.
shortcut->setContext(Qt::WidgetShortcut);
connect(shortcut, SIGNAL(activated()), button, SLOT(click()));
connect(shortcut, SIGNAL(activatedAmbiguously()), button, SLOT(click()));
QShortcut* shorcut = new QShortcut(Qt::Key_Enter, textEdit);
shortcut->setContext(Qt::WidgetShortcut);
connect(shortcut, SIGNAL(activated()), button, SLOT(click()));
connect(shortcut, SIGNAL(activatedAmbiguously()), button, SLOT(click()));
To copy to clipboard, switch view to plain text mode
Bookmarks