Qt mimic jQuery shake effect
Here is how a jQuery shake effect looks like: jQuery site (just scroll down and click the box as it asks in the demo). I want to do a similar thing with a QWidget in my Qt app.
How do I do this? I am sorry that I am unable to post any code to show what I have tried till now, but I couldn't try anything at all, there doesn't seem to be any convenient animation API which will allow me to do such a thing. Of course I can make do with a timer, but that will be very clumsy.
Re: Qt mimic jQuery shake effect
You are probably looking at the "wrong" (not ideal) UI technology. QtQuick is the one that makes animations very easy, almost trivial.
Cheers,
-
Re: Qt mimic jQuery shake effect
The project is not using QtQuick, so cannot resort to that. Any other way of doing it?
Re: Qt mimic jQuery shake effect
You can try using a QPropertyAnimation on the widget's geometry property.
Cheers,
_
Re: Qt mimic jQuery shake effect
Yeah, found the API. Will try it and post further if I am stuck.