我要组合框;组合框1和组合框2。 我想从两个组合框中检索值,以得到“早餐”还是“午餐”的结果
Combobox1将获取小时数据,例如07、08、09、10 combobox2将获取分钟的数据,例如30、59等
预期结果是系统获取这两个值,并确定这是早餐还是午餐。一个例子是07和59,这使得它是早上7:59,这是早餐。你知道吗
我有两个功能,分别打印用户选择的值。。。我想打印“您选择了‘07:59’” 另外,我想让系统识别它是早餐,这样我可以打开早餐页面时,我继续下一页。你知道吗
page.comboBox.addItems(selecthour)
page.comboBox.activated[str].connect(self.onComboActivated)
page.comboBox.setGeometry(150,30,105,40)
page.comboBox2.addItems(selectmin)
page.comboBox2.activated[str].connect(self.onCombo2Activated)
page.comboBox2.setGeometry(280,30,105,40)
def onCombo2Activated(self, text):
print("choose time: {}".format(text))
if 800<= int(text) <= 1200:
print('Hello')
试试看:
相关问题 更多 >
编程相关推荐