jobs.cpp 443 B

12345678910111213141516171819
  1. #include "jobs.h"
  2. void JOBS ::btn_animation(QWidget *obj, QPropertyAnimation *animation, int start, int end)
  3. {
  4. int start_size = obj->width();
  5. int end_size;
  6. if (obj->width() == start) {
  7. end_size = end;
  8. } else {
  9. end_size = start;
  10. }
  11. animation->setStartValue(start_size);
  12. animation->setEndValue(end_size);
  13. animation->setEasingCurve(QEasingCurve::InOutQuart);
  14. animation->start();
  15. }