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.C++ Anonymous, Apr 4, 2019
You can't use slots. Use events. In general, it's a repeat.
And the picture in the question in general has nothing to do with the matter. The task is to get the fact of pressing a key.Anonymous
Roughly speaking, keyPressEvent (if I remember its name correctly) will be the usual method in your class, where the image is managed. You press a key, this function is called and the code that you write there is executed. Strange, I thought there were many examples on the Internet on this topic.Anonymous
To place the code, please use CodePen or similar tool. Thanks you!