jobs.cpp 432 B

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