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.