How to make a such button? Need help quick
Hey everyone
I have some kind of a project in my mind and i need some advice to be able to program it. So all i need to do create 1 basic button. When people click the button, the button will move horizontally back and forth (kinda like a wave) for some certain amount of time. I watched many tutorials but i couldnt find anything similar so if you guys have any ideas how to build something like this it would be so great if you would share some ideas with me.
Anyway thank you and have a nice day :)
Re: How to make a such button? Need help quick
Make an empty widget to hold the button.
Make a button
Make a timer
Attach clicked() signal of the button to start the timer
Attach timeout signal of the timer to some slot that moves the position of the button in the form (need to check for 'collisions' with the edge of the form here)
I'll leave up to you to figure how to deal with stopping the button moving.
Re: How to make a such button? Need help quick
QPropertyAnimation will probably be of interest
Re: How to make a such button? Need help quick