# 发射信号使按钮高亮
def change_backcolor_pushButton(self):
if self.pushButton_102.text() == '发射信号高亮':
self.pushButton_101.setStyleSheet('background-color: rgb(0, 170, 0);')
self.pushButton_102.setText("取消高亮")
elif self.pushButton_102.text() == '取消高亮':
self.pushButton_101.setStyleSheet('')
self.pushButton_102.setText("发射信号高亮")
# 下拉选择的随机赋值
def rand(self):
com1 = random.randint(0, 4)
com2 = random.randint(0, 4)
self.comboBox.setCurrentIndex(com1)
self.comboBox_2.setCurrentIndex(com2)
PyQt5中发射信号使按钮高亮与下拉选择的随机赋值
最新推荐文章于 2024-08-20 16:20:53 发布