D
D
DenY22015-06-29 15:23:48
Qt
DenY2, 2015-06-29 15:23:48

How to use slots to record keystrokes on the keyboard?

There is a picture, you need to move it by pressing a key (any), do you need slots, if so, how to implement all this with their help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Antony, 2015-06-29
@RiseOfDeath

Not with slots. Use events. In general, this is a repetition
. And the picture in the question has nothing to do with the matter at all. The task after all to receive the fact of pushing of a key.

D
Dmitry, 2015-06-29
@ubuntuman

Roughly speaking, keyPressEvent (if I remember its name correctly) will be a regular method in your class, where the picture is controlled. You press a key, this function is called and the code that you write there is executed. Strange, I thought there were a lot of examples on the Internet about this topic.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question