Hi, i am new user and my english is not a best so please for your understanding

I have a few QToolButton in QToolBar which animates with QPropertAnimation. Something like this
Qt Code:
  1. animation_enabled->setTargetObject( button );
  2. animation_enabled->setPropertyName( "pos" );
  3. animation_enabled->setDuration( 100 );
  4. animation_enabled->setEndValue( QPoint( button->pos().x(), animation_pos_end ) );
  5.  
  6. animation_enabled->start();
To copy to clipboard, switch view to plain text mode 

the problem is that when the animation is running and i change size of the main window my animation changing positions. Why it happens and what i am doing wrong?
animation.JPG
bad_animation.JPG