Reputation: 846
so I have a slider that has the range 2.5 to 20
I would like to add on the left of the slider 2.5 and on the right 20 so the user know what is the range
another thing I would like to display the value while the user changing the slider
here what I have so far
sld = QtGui.QSlider(QtCore.Qt.Horizontal, window2)
sld.setRange(2.5, 30)
sld.setGeometry(30, 20, 200, 30)
Upvotes: 1
Views: 3579
Reputation: 856
I would suggest you just build a new composite widget out of the following:
Just arrange these using a horizontal layout (for 2, 3, 4) inside a vertical layout (for 1 + the horizontal layout), and things will work great.
Hope that helps.
Upvotes: 2