Hi to all,
I'm reading the Animation Framework and I would try it in my application.
I would animate the position of a little dialog that I show pressing a button.

This is the code I tried:

Qt Code:
  1. // executed on the released() signal of a button
  2. void WaveWidget::onShowInfoPanel()
  3. {
  4. if( !m_panel->isVisible() )
  5. {
  6. m_panel->setVisible(true);
  7. QPropertyAnimation animation(m_panel, "geometry");
  8. animation.setDuration(2000);
  9. animation.setStartValue(QRect(0, 0, 135, 240));//just an example
  10. animation.setEndValue(QRect(250, 250, 135, 240));//just an example
  11. animation.start();
  12. }
  13. else
  14. m_panel->setVisible(false);
  15. }
To copy to clipboard, switch view to plain text mode 

So I would give to the panel an animated effect but nothing happens when I show the panel. When I press the button the panes is shown without any special effect.

Is my code incorrect?
Regards