File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11#include " qanimatedslider.h"
2+ #include < QEvent>
23/*
34 * MIT License
45
@@ -28,8 +29,9 @@ QAnimatedSlider::QAnimatedSlider(QWidget *parent)
2829 : QSlider(parent)
2930{
3031 anim = new QPropertyAnimation (this ," value" );
31- connect (this ,&QSlider::valueChanged ,[this ]{
32+ connect (this ,&QSlider::sliderMoved ,[this ]{
3233 cValue = value ();
34+ emit valueChangedA (cValue);
3335 });
3436}
3537
@@ -78,3 +80,4 @@ void QAnimatedSlider::setDuration(int duration)
7880}
7981
8082
83+
Original file line number Diff line number Diff line change @@ -68,7 +68,8 @@ class QAnimatedSlider : public QSlider
6868 By default, this value is set to 300ms.
6969 */
7070 void setDuration (int duration);
71-
71+ signals:
72+ void valueChangedA (int value);
7273private:
7374 QVariantAnimation* anim;
7475 int cValue = 0 ;
You can’t perform that action at this time.
0 commit comments