make sure all animations have a parent
This commit is contained in:
parent
d17eb9b32f
commit
1f557c106b
|
@ -19,25 +19,27 @@ CheckBoxPrivate::~CheckBoxPrivate()
|
|||
|
||||
void CheckBoxPrivate::init()
|
||||
{
|
||||
Q_Q(CheckBox);
|
||||
|
||||
QPropertyAnimation *animation;
|
||||
|
||||
animation = new QPropertyAnimation(checkedIcon, "iconSize");
|
||||
animation = new QPropertyAnimation(checkedIcon, "iconSize", q);
|
||||
animation->setStartValue(0);
|
||||
animation->setEndValue(24);
|
||||
animation->setDuration(250);
|
||||
uncheckedTransition->addAnimation(animation);
|
||||
|
||||
animation = new QPropertyAnimation(uncheckedIcon, "color");
|
||||
animation = new QPropertyAnimation(uncheckedIcon, "color", q);
|
||||
animation->setDuration(250);
|
||||
uncheckedTransition->addAnimation(animation);
|
||||
|
||||
//
|
||||
|
||||
animation = new QPropertyAnimation(uncheckedIcon, "color");
|
||||
animation = new QPropertyAnimation(uncheckedIcon, "color", q);
|
||||
animation->setDuration(550);
|
||||
checkedTransition->addAnimation(animation);
|
||||
|
||||
animation = new QPropertyAnimation(checkedIcon, "opacity");
|
||||
animation = new QPropertyAnimation(checkedIcon, "opacity", q);
|
||||
animation->setDuration(450);
|
||||
checkedTransition->addAnimation(animation);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
CircularProgressPrivate::CircularProgressPrivate(CircularProgress *q)
|
||||
: q_ptr(q),
|
||||
delegate(0),
|
||||
delegate(new CircularProgressDelegate(q)),
|
||||
progressType(Material::IndeterminateProgress),
|
||||
size(64),
|
||||
penWidth(6.25),
|
||||
|
@ -25,8 +25,6 @@ void CircularProgressPrivate::init()
|
|||
{
|
||||
Q_Q(CircularProgress);
|
||||
|
||||
delegate = new CircularProgressDelegate(q);
|
||||
|
||||
QSizePolicy policy(QSizePolicy::MinimumExpanding,
|
||||
QSizePolicy::MinimumExpanding);
|
||||
q->setSizePolicy(policy);
|
||||
|
|
|
@ -19,7 +19,7 @@ public:
|
|||
void init();
|
||||
|
||||
CircularProgress *const q_ptr;
|
||||
CircularProgressDelegate *delegate;
|
||||
CircularProgressDelegate *const delegate;
|
||||
Material::ProgressType progressType;
|
||||
int size;
|
||||
qreal penWidth;
|
||||
|
|
Loading…
Reference in New Issue