mirror of
https://github.com/pyapp-kit/superqt.git
synced 2025-09-07 10:10:31 +02:00
commit 466fc7c19ace1343d23739e4058758cd21328511 Author: Talley Lambert <talley.lambert@gmail.com> Date: Wed Jun 2 20:22:38 2021 -0400 add deploy cond commit e9965e71490689935b61099225acc7f3bf5c2d48 Author: Talley Lambert <talley.lambert@gmail.com> Date: Wed Jun 2 20:20:45 2021 -0400 more precommit commit b39150b16d7d64a5530ec9a0e29e673e2b6ed0a4 Author: Talley Lambert <talley.lambert@gmail.com> Date: Wed Jun 2 19:52:42 2021 -0400 updating precommit commit d5018b38e7bc59f81cc161cca06fae829e493e3c Author: Talley Lambert <talley.lambert@gmail.com> Date: Wed Jun 2 19:42:32 2021 -0400 big reorg
28 lines
793 B
Python
28 lines
793 B
Python
from qwidgets import QDoubleRangeSlider, QDoubleSlider, QRangeSlider
|
|
from qwidgets.qtcompat.QtCore import Qt
|
|
from qwidgets.qtcompat.QtWidgets import QApplication, QVBoxLayout, QWidget
|
|
|
|
app = QApplication([])
|
|
|
|
w = QWidget()
|
|
|
|
sld1 = QDoubleSlider(Qt.Horizontal)
|
|
sld2 = QDoubleRangeSlider(Qt.Horizontal)
|
|
rs = QRangeSlider(Qt.Horizontal)
|
|
|
|
sld1.valueChanged.connect(lambda e: print("doubslider valuechanged", e))
|
|
|
|
sld2.setMaximum(1)
|
|
sld2.setValue((0.2, 0.8))
|
|
sld2.valueChanged.connect(lambda e: print("valueChanged", e))
|
|
sld2.sliderMoved.connect(lambda e: print("sliderMoved", e))
|
|
sld2.rangeChanged.connect(lambda e, f: print("rangeChanged", (e, f)))
|
|
|
|
w.setLayout(QVBoxLayout())
|
|
w.layout().addWidget(sld1)
|
|
w.layout().addWidget(sld2)
|
|
w.layout().addWidget(rs)
|
|
w.show()
|
|
w.resize(500, 150)
|
|
app.exec_()
|