当前位置:网站首页>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 !
边栏推荐
- A Mechanics-Informed Artificial Neural Network Approach in Data-Driven Constitutive Modeling 学习
- Unity package manager starting server stuck
- unity package manager starting server stuck(Unity啟動卡在starting server,然後報錯)
- 桌面以及文件资源管理器无限重启的解决
- R 16 basic exercises
- Redis第四话 -- redis高性能原理(多路复用)和高可用分析(备份、主从)
- The input value "18-20000hz" is incorrect. The setting information is incomplete. Please select a company
- File upload vulnerability - simple exploitation 2 (Mozhe college shooting range)
- Product information | Poe network card family makes a collective appearance, the perfect partner of machine vision!
- STC hardware only automatic download circuit V2
猜你喜欢

Power supply anti reverse connection and anti backflow - use MOS tube and op amp to realize ideal diode

Final examination of theory and practice of socialism with Chinese characteristics 1

8 r subset

First modelarts training

unity package manager starting server stuck(Unity启动卡在starting server,然后报错)

Shanghai internal promotion 𞓜 Yuyang teacher's research group of Shanghai Chizhi research institute recruits full-time researchers

Windows icon display exception resolution. The desktop icon is abnormal, the start menu icon is abnormal, and the taskbar icon is abnormal. Icon cache location.

moderlarts第一次培训

28. JS implementation mechanism

12 date and time in R
随机推荐
Redis fourth session - redis high performance principle (multiplexing) and high availability analysis (backup, master-slave)
File upload vulnerability - simple exploitation 2 (Mozhe college shooting range)
var 和 let的区别_let 和 var的区别
2022-2028 global and Chinese thermopile and microbolometer infrared detector Market Status and future development trend
Two end carry output character
Mysql add 新增多个新字段并指定字段位置
电源防反接和防倒灌 - 使用MOS 管和运放实现理想二极管
First modelarts training
8 r subset
Research and Analysis on the market status of polybutene-1 in China from 2021 to 2027 and forecast report on its development prospect
【数据可视化】使用 Apache Superset 可视化 ClickHouse 数据
Current situation and future development trend of global and Chinese cogeneration system market from 2022 to 2028
Toolbar替换ActionBar后Title不显示
桌面以及文件资源管理器无限重启的解决
【数据可视化】Apache Superset 1.2.0教程 (二)——快速入门(可视化王者英雄数据)
moderlarts第二次作业
Unity package manager starting server stuck
Gestionnaire de paquets d'Unit é Starting Server Stuck
Date of SQL optimization_ Format() function
2022-2028 current market situation and future development trend of thermopile Pyranometers in the world and China