PySide/PyQt, is is possible to make sliders dependent i.e. give them a combined maximum

StackOverflow https://stackoverflow.com/questions/19349069

  •  30-06-2022
  •  | 
  •  

Domanda

In pyside or pyqt:

Say that I have 3 sliders whose combined value mustn't exceed 9 or/and that it would always have to be 9. Is there an inbuilt way to make them depended in such a way, or do I have to program them.

Illustration:
  0123456789
1 ---------|
2 |---------
3 |---------

  0123456789
1 ---|------
2 ---|------
3 ---|------
È stato utile?

Soluzione

The available slots and singals on a QSlider mean that there would be no way to automatically have them all connect. To do this you would need to create a custom widget or at the least code in some additional logic.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top