Hi,
I was trying the animation examples given in the Qt docs. This is the code which I used-

Qt Code:
  1. #include <QtCore>
  2. #include <QApplication>
  3. #include <QtGui>
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7. QApplication a(argc, argv);
  8. QPushButton *button1=new QPushButton("Animated");
  9. button1->show();
  10. QPushButton *button2 = new QPushButton("Not animated");
  11. button2->setGeometry(50, 50, 100, 30);
  12. button2->show();
  13. QPropertyAnimation animation(button1, "geometry");
  14. animation.setDuration(5000);
  15. animation.setKeyValueAt(0, QRect(0, 0, 100, 30));
  16. animation.setKeyValueAt(0.1, QRect(150, 150, 100, 30));
  17. animation.setKeyValueAt(1, QRect(0, 0, 100, 30));
  18. animation.setEasingCurve(QEasingCurve::OutBounce);
  19. animation.start();
  20. return a.exec();
  21. }
To copy to clipboard, switch view to plain text mode 

It works fine but, the "Animated" button passes under/below the "Not animated" button when I execute the code.I would prefer that the "Animated" button passes over/above the "Not animated" button.Is there any simple way of doing that?
Please advice.

Thank you.