Connecting the push of a button with a QPushButton?
Solved
General and Desktop
-
Hello, how can I connect the push of a keyboard key (up, down left, right) with 4 different QPushButton?
I've tried the QShortcut class, but I did not find examples that can give me a good explanation. -
Hello, how can I connect the push of a keyboard key (up, down left, right) with 4 different QPushButton?
I've tried the QShortcut class, but I did not find examples that can give me a good explanation.@Pedro_Monteiro
You can use QShortcut with QKeySequence with key enum.
and connect something like thisconnect(shortcut, SIGNAL(activated()), this, SLOT(on_pushButton_Up_clicked()));
-
@Pedro_Monteiro
You can use QShortcut with QKeySequence with key enum.
and connect something like thisconnect(shortcut, SIGNAL(activated()), this, SLOT(on_pushButton_Up_clicked()));
@Ratzz Thanks, you saved me.