Nakh0d4
Nakh0d4

Reputation: 65

How to prevent to change slider's value by clicking on slider in PYQT?

In PYQT, how we can change the slider's value just by drag the slider tong? If you click on the slider, the tong moves and it causes sliderReleased signal is not triggered.

Upvotes: 2

Views: 817

Answers (1)

Just Endy
Just Endy

Reputation: 36

Try to change its pageStep to 0

slider = PyQt5.QtWidgets.QAbstractSlider()
slider.setPageStep(0)

pageStep contains the number of steps that changes value when you press on a slider without touching its tongue.

Upvotes: 2

Related Questions