PyQt QSlider with QLabel(QLabel is on the left side, QSlider is on the right side, horizontal direction only) QLabel's value synchronizes with QSlider's value.
Project description
pyqt-label-slider
PyQt QSlider with QLabel(QLabel is on the left side, QSlider is on the right side, horizontal direction only) QLabel's value synchronizes with QSlider's value.
Requirements
PyQt5 >= 5.8
Setup
python pip -m install pyqt-label-slider
Usage
-
getSlider()
to get QSlider. -
getLabel()
to get QLabel.
Note
- Tick interval is set at 10.
Example
Code Sample
from PyQt5.QtWidgets import QApplication, QMainWindow
from pyqt_label_slider.labelSlider import LabelSlider
class Example(QMainWindow):
def __init__(self):
super().__init__()
self.__initUi()
def __initUi(self):
widget = LabelSlider()
slider = widget.getSlider()
slider.setMaximumWidth(150)
slider.setRange(10, 200)
self.setCentralWidget(widget)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
ex = Example()
ex.show()
sys.exit(app.exec_())
Result
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pyqt_label_slider-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3fd171ad8c0e33a3f824939b536556ed08e3f279c9bfe3bcf1867520573f202 |
|
MD5 | e7d54dd5a0ffde061aacd197b7c5f6c7 |
|
BLAKE2b-256 | 2f50ede094859add05b7774e59f2c62673c1fe599beb119f23fac2352a905429 |