i have this code:

Qt Code:
  1. void myclass::on_btn_slot()
  2. {
  3. QPropertyAnimation *a = new QPropertyAnimation( ui->btn , "geometry" );
  4. a->setStart.....
  5. a->setEnd....
  6. a->setDuration...
  7. a->setLoopCount....
  8. a->start(QAbstractAnimation::Delete....);
  9. }
To copy to clipboard, switch view to plain text mode 

Once that animation is playing, how can I disable the call of the slot?
Because then if I click during animation, this resets.

I do not want to disable the button and I seek a solution that allows me
handle everything in this method / slot


i thinked to use a boolean but i should to connect the finish signal of animation with a method