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()
|
void CheckBoxPrivate::init()
|
||||||
{
|
{
|
||||||
|
Q_Q(CheckBox);
|
||||||
|
|
||||||
QPropertyAnimation *animation;
|
QPropertyAnimation *animation;
|
||||||
|
|
||||||
animation = new QPropertyAnimation(checkedIcon, "iconSize");
|
animation = new QPropertyAnimation(checkedIcon, "iconSize", q);
|
||||||
animation->setStartValue(0);
|
animation->setStartValue(0);
|
||||||
animation->setEndValue(24);
|
animation->setEndValue(24);
|
||||||
animation->setDuration(250);
|
animation->setDuration(250);
|
||||||
uncheckedTransition->addAnimation(animation);
|
uncheckedTransition->addAnimation(animation);
|
||||||
|
|
||||||
animation = new QPropertyAnimation(uncheckedIcon, "color");
|
animation = new QPropertyAnimation(uncheckedIcon, "color", q);
|
||||||
animation->setDuration(250);
|
animation->setDuration(250);
|
||||||
uncheckedTransition->addAnimation(animation);
|
uncheckedTransition->addAnimation(animation);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
||||||
animation = new QPropertyAnimation(uncheckedIcon, "color");
|
animation = new QPropertyAnimation(uncheckedIcon, "color", q);
|
||||||
animation->setDuration(550);
|
animation->setDuration(550);
|
||||||
checkedTransition->addAnimation(animation);
|
checkedTransition->addAnimation(animation);
|
||||||
|
|
||||||
animation = new QPropertyAnimation(checkedIcon, "opacity");
|
animation = new QPropertyAnimation(checkedIcon, "opacity", q);
|
||||||
animation->setDuration(450);
|
animation->setDuration(450);
|
||||||
checkedTransition->addAnimation(animation);
|
checkedTransition->addAnimation(animation);
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
CircularProgressPrivate::CircularProgressPrivate(CircularProgress *q)
|
CircularProgressPrivate::CircularProgressPrivate(CircularProgress *q)
|
||||||
: q_ptr(q),
|
: q_ptr(q),
|
||||||
delegate(0),
|
delegate(new CircularProgressDelegate(q)),
|
||||||
progressType(Material::IndeterminateProgress),
|
progressType(Material::IndeterminateProgress),
|
||||||
size(64),
|
size(64),
|
||||||
penWidth(6.25),
|
penWidth(6.25),
|
||||||
|
@ -25,8 +25,6 @@ void CircularProgressPrivate::init()
|
||||||
{
|
{
|
||||||
Q_Q(CircularProgress);
|
Q_Q(CircularProgress);
|
||||||
|
|
||||||
delegate = new CircularProgressDelegate(q);
|
|
||||||
|
|
||||||
QSizePolicy policy(QSizePolicy::MinimumExpanding,
|
QSizePolicy policy(QSizePolicy::MinimumExpanding,
|
||||||
QSizePolicy::MinimumExpanding);
|
QSizePolicy::MinimumExpanding);
|
||||||
q->setSizePolicy(policy);
|
q->setSizePolicy(policy);
|
||||||
|
|
|
@ -18,8 +18,8 @@ public:
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
CircularProgress *const q_ptr;
|
CircularProgress *const q_ptr;
|
||||||
CircularProgressDelegate *delegate;
|
CircularProgressDelegate *const delegate;
|
||||||
Material::ProgressType progressType;
|
Material::ProgressType progressType;
|
||||||
int size;
|
int size;
|
||||||
qreal penWidth;
|
qreal penWidth;
|
||||||
|
|
Loading…
Reference in New Issue