V
V
Vadim kyklaed2016-11-01 12:44:29
Python
Vadim kyklaed, 2016-11-01 12:44:29

How to perform button action on button click on keyboard?

Hello everyone, tell me how to make the QPushButton ("Translate") button - this example
launches the action not only by clicking it with the mouse, but also from the keyboard?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
NaName, 2016-11-01
@NaName

widget_name.bind ('KeyPress-button_name', method_name)
if you used tkinter - something like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question