I'm trying to connect several shortcuts to a slot,in order to get their key value and append it to a variable. Something like text input, so i do something like this:
button_1 = new QShortcut::QShortcut(QKeySequence("1"),this);
connect(button_1,SIGNAL(activated(QKeySequence)),this, SLOT(keybord_shortcuts(QKeySequence)));
which is not correct because activated()
wont get the sequence that calls the shortcut to my slot keybord_shortcuts
.
No such signal QShortcut::activated(QKeySequence)
Is there other way than activated()
? Any help welcomed.
Thanks.