12345678910111213141516171819 |
- #include "jobs.h"
- void JOBS ::btn_animation(QWidget *obj, QPropertyAnimation *animation, int start, int end)
- {
- int start_size = obj->width();
- int end_size;
- if (obj->width() == start) {
- end_size = end;
- } else {
- end_size = start;
- }
- animation->setStartValue(start_size);
- animation->setEndValue(end_size);
- animation->setEasingCurve(QEasingCurve::InOutQuart);
- animation->start();
- }
|