Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjg30737/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.
https://github.com/yjg30737/pyqt-label-slider
pyqt pyqt-examples pyqt-gui pyqt-qslider pyqt-tutorial pyqt5 pyqt5-examples pyqt5-gui pyqt5-qslider pyqt5-tutorial python python3 python37 qlabel qslider qt
Last synced: 16 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-label-slider
- Owner: yjg30737
- License: mit
- Created: 2022-01-05T05:09:10.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-14T08:31:28.000Z (over 2 years ago)
- Last Synced: 2024-10-10T09:37:58.349Z (2 months ago)
- Topics: pyqt, pyqt-examples, pyqt-gui, pyqt-qslider, pyqt-tutorial, pyqt5, pyqt5-examples, pyqt5-gui, pyqt5-qslider, pyqt5-tutorial, python, python3, python37, qlabel, qslider, qt
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```python
from PyQt5.QtWidgets import QApplication, QMainWindow
from pyqt_label_slider.labelSlider import LabelSliderclass 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 sysapp = QApplication(sys.argv)
ex = Example()
ex.show()
sys.exit(app.exec_())
```Result
https://user-images.githubusercontent.com/55078043/148164060-30f842f1-a64e-4553-abba-f37c7d0f8365.mp4