当前位置:网站首页>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()))边栏推荐
- WordPress upgrade error: briefly unavailable for scheduled maintenance [resolved]
- Solr initialization failure: requesthandler INIT failure
- [long time series prediction] aotoformer code detailed [3] model overall architecture analysis
- MySQL学习笔记:JSON嵌套数组查询
- Recent learning and update plan
- 微信模版消息errcode“:40165,“errmsg“:“invalid weapp pagepath
- DNS Optimization Practice of APP network optimization
- The Google search console webmaster tool cannot read the sitemap?
- 反射三种方式
- Log4j:error category option "1" not a decimal integer
猜你喜欢

Arduino uses nRF24L01 module for wireless communication

Looking at the ups and downs of the mobile phone accessories market from the green Union's sprint for IPO

If you understand the logic of mining and carbon neutrality, you will understand the 100 billion market of driverless mining areas

Young people fleeing big cities: shouldering housing prices and pressure, but not epidemics

How to add two factor authentication for WordPress websites

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

Arduino uno connected to jq8900-16p voice broadcast module

Correct posture of cocoscreator's native secondary development

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

GraphAcademy 課程講解:《Neo4j 圖數據科學基礎》
随机推荐
The two request sessionids of the same user are inconsistent ----- record the problem
Solr import MySQL database report: Data config problem: invalid byte 2 of 2-byte UTF-8 sequence
2022年熔化焊接与热切割操作证考试题库及答案
深入解析问号表达式
【长时间序列预测】Aotoformer 代码详解之[3]模型整体架构分析
Question bank and answers for 2022 melting welding and thermal cutting operation certificate examination
CPT 102_ LEC 16
AOSP - Developer mode is enabled by default
数据库唯一索引和普通索引的区别?
sonarqube平台基础使用
Unity项目优化详解(持续补充ing)
RS232/RS485转4G DTU 上传基于Modbus协议的温湿度传感器数据到远程TCP服务器
CPT 102_ LEC 20
Blue Bridge Cup_ Xiao Lan eats candy_ Pigeon nest principle / drawer principle
Young people fleeing big cities: shouldering housing prices and pressure, but not epidemics
VMware虚拟机IP,网关设置。虚拟机ping不通外网
Array full permutation
pip 安装 qt5 。
Error in Solr access: error initializing queryelevationcomponent
Android WiFi hide SSID configuration method