因為是python新手
想做一個manubar,功能是先點選下拉的數字後
再按下trigger的按鈕後可以連結到for回圈的變數a
ex:選擇1時,a=2 ; 選擇5時,a=5
想請問一下應該怎麼修改才是正確的語法?
self.button_test = QPushButton()
self.button_test.setText("trigger")
self.button_test.clicked.connect(self.content)
self.combo = QComboBox()
self.combo.addItem("2")
self.combo.addItem("5")
self.combo.addItem("10")
self.combo.activated[str].connect(self.content)
def content(self):
a = int (self.combo.text())
for i in range(1,a):
...