Commit 44649aae authored by Clément Stenac's avatar Clément Stenac

Fix a bug with slider positionning

parent fded9ae5
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
#endif #endif
int pos = (int)(minimum() + int pos = (int)(minimum() +
(double)(event->x())/width1*(maximum()-minimum()) ); (double)(event->x())/width1*(maximum()-minimum()) );
setSliderPosition( pos ); setValue( pos );
QSlider::mousePressEvent(event); QSlider::mousePressEvent(event);
} }
} }
......
...@@ -35,7 +35,7 @@ InputSlider::InputSlider( Qt::Orientation q,QWidget *_parent ) : ...@@ -35,7 +35,7 @@ InputSlider::InputSlider( Qt::Orientation q,QWidget *_parent ) :
setMinimum( 0 ); setMinimum( 0 );
setMaximum( 1000 ); setMaximum( 1000 );
setSingleStep( 2 ); setSingleStep( 2 );
setPageStep( 1000 ); setPageStep( 10 );
setTracking( true ); setTracking( true );
connect( this, SIGNAL( valueChanged(int) ), this, SLOT( userDrag( int ) ) ); connect( this, SIGNAL( valueChanged(int) ), this, SLOT( userDrag( int ) ) );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment