当前位置:网站首页>Pyqt5 technical part - set the default value of qcombobox drop-down box and get the current selection of the drop-down box
Pyqt5 technical part - set the default value of qcombobox drop-down box and get the current selection of the drop-down box
2022-06-11 20:46:00 【Xiaolan jujube】
setCurrentIndex() You can set the current content to... Through the index items A value in , from 0 Start .
example :“2" On behalf of " Script management ”
currentText() You can get the currently selected content .
items = [" Script recorded ", " Script playback ", " Script management "]
self.comboBox = QtWidgets.QComboBox()
self.comboBox.addItems(items)
self.comboBox.setCurrentIndex(2) # Set the default value
self.comboBox.currentText() # Get current content
- 1.
- 2.
- 3.
- 4.
- 5.
Run the renderings :

Let's like it !
边栏推荐
- Gestionnaire de paquets d'Unit é Starting Server Stuck
- 新品发布:国产单电口千兆网卡正式量产!
- 2022-2028 global and Chinese thermopile array module market status and future development trend
- 10 R vector operation construction
- [file upload vulnerability 04] server side mime detection and bypass experiment (based on upload-labs-2 shooting range)
- moderlarts第二次作业
- [Unity插件]着色器关键字分析工具ShaderControl
- LR-LINK联瑞携新品首次亮相数博会-助力新基建数据中心建设
- Role of RESNET residual block
- Why should I use iwarp, roce V2, nvme of and other protocols for 100g network transmission
猜你喜欢

重投农业,加码技术服务,拼多多底盘进一步夯实

Using the flask framework to write the bezel

MySQL installation free configuration tutorial under Windows mysql-5.6.51-winx64 Zip version

Final examination of Dialectics of nature 1

银泰百货与淘宝天猫联合打造绿色潮玩展,助力“碳中和”

7905 and TL431 negative voltage regulator circuit - regulator and floating circuit relative to the positive pole of the power supply

Modify appid of local wechat applet

Date of SQL optimization_ Format() function

ICML 2022 𞓜 rethinking anomaly detection based on structured data: what kind of graph neural network do we need

7905 和TL431 负电压稳压电路 - 相对于电源正极的稳压和浮地电路
随机推荐
Modify appid of local wechat applet
Lanqi technology joins in, and dragon dragon dragon community welcomes leading chip design manufacturers again
为什么100G网络传输要使用iWARP、RoCE v2、NVMe-oF等协议
The tutor transferred me 800 yuan and asked me to simulate a circuit (power supply design)
重投农业,加码技术服务,拼多多底盘进一步夯实
频域滤波器
Show your creativity and win the graphics card! Mmpose attitude estimation creative contest shocks
桌面以及文件资源管理器无限重启的解决
vectorDrawable使用报错
7905 and TL431 negative voltage regulator circuit - regulator and floating circuit relative to the positive pole of the power supply
Summary of C language programming knowledge points 01
【数据可视化】使用 Apache Superset 可视化 ClickHouse 数据
[file upload vulnerability 04] server side mime detection and bypass experiment (based on upload-labs-2 shooting range)
Figure guessing game
2022-2028 global and Chinese thermal power generation (TEG) module market status and future development trend
28. JS执行机制
Current situation and future development trend of tropical forage seed market in the world and China from 2022 to 2028
[data visualization] use Apache superset to visualize Clickhouse data
Installation and performance test of Apache APIs IX on Amazon graviton3
The first bullet of comparative learning