当前位置:网站首页>Pyqt5:slider slider control
Pyqt5:slider slider control
2022-06-11 03:04:00 【Solitary rest】
Slider There are generally two types of controls , Horizontal and vertical , Take the horizontal as an example
# Set max min
self.horizontalSlider.setMaximum(80)
self.horizontalSlider.setMinimum(10)
# Set single step value
self.horizontalSlider.setSingleStep(2)
# Set initial value
self.horizontalSlider.setValue(40)
# Set tick mark position
self.horizontalSlider.setTickPosition(QSlider.TicksBelow)
# Set the signal and slot
self.horizontalSlider.valueChanged.connect(self.value)
# The function of the slot is to use the slider to control a label font size
def value(self):
size = self.horizontalSlider.value()
self.label_4.setFont(QFont('Arial', size))
print(' The current value is ' + str(self.horizontalSlider.value()))边栏推荐
- Chapter VII introduction to common protocols (1)
- How to state clearly and concisely the product requirements?
- Live broadcast! Feature matching of orb-slam3 series (mlpnp, word bag model, etc.).
- HQChart实战教程55-欧易网K线面积图
- Arduino Uno接JQ8900-16p语音播报模块
- B_QuRT_User_Guide(18)
- B_QuRT_User_Guide(20)
- Error excluded identifier before '(' token, grpc enumeration class compilation error
- 近期学习和更新计划
- Deep parsing of question mark expressions
猜你喜欢

Rs232/rs485 to 4G DTU uploading temperature and humidity sensor data based on Modbus protocol to remote TCP server

B_QuRT_User_Guide(16)

Go 语言的优势和学习路线图

HQChart实战教程55-欧易网K线面积图

巴歇尔槽流量计远程采集物联网关在明渠流量监测的应用

How to handle error code 30204-44 when installing office 2016 in win10?

How to add cookie pop-up window in WordPress website (without plug-in)

msg=SolrCore ‘collection1‘ is not available due to init failure: Could not l

怎样确保消息的可靠性投递?

HUST Software Engineering (Experiment 2) -- TDD test driven development experiment.
随机推荐
Go 语言的优势和学习路线图
Rs232/rs485 to 4G DTU uploading temperature and humidity sensor data based on Modbus protocol to remote TCP server
出栈序列是否是入栈序列
com. mchange. v2.c3p0. Combopooleddatasource red
三维GIS行业需求及展望
DNS Optimization Practice of APP network optimization
Openjudge noi 1.13 17: text layout
两部门联合印发《校外培训机构消防安全管理九项规定》
[resolved] how to fix another update in progress WordPress upgrade error
WinDbg-虚拟机-双机调试-驱动文件的调试
深入解析问号表达式
Helm deploy traifik ingress
Prophet
The two departments jointly issued the nine provisions on fire safety management of off campus training institutions
Longest increasing subsequence
HOSATAPD_ CLI debug using WiFi whitelist
Solr initialization failure: requesthandler INIT failure
Go语言之Go 快速入门篇(一):第一个 Go 程序
C语言数组的简单认识
CPT 102_ LEC 18