我有问题。线程产生错误。我回调;
self.infobutton.clicked.connect(self.info_price)
我整天都在寻找,但没有找到。
class func(object):
def info_price(self):
try:
self.text=self.coin_price_combo.currentText()
self.text=self.text.upper()
except:
pass
def response_price(label, combo):
from config import x
try:
x.get_symbol_ticker(symbol=self.text)
combo.setEnabled(False)
except:
label.setText("Error not connection!")
self.cont_res_while=False
while self.cont_res_while==True: #Error is here.
try:
res=x.get_symbol_ticker(symbol=text)
label.setText(text+" : " + res['price'])
except:
label.setText("Error not connection!")
if 0==self.tabWidget.currentIndex():
threading.Thread(target=response_price, args=(self.label_2, self.coin_price_combo,)).start()
else:
pass
def control(self):
self.cont_res_while=True
有人知道为什么吗?