0
這只是我的代碼的一部分。當我點擊btn_convert
或btn_save function
(self.convertThread.start
和self.convert_and_save
)工作。但是當我點擊btn_convert_save
,只能工作self.open
。問題是,爲什麼點擊btn_convert_save
後不能啓動全部3個功能?如何在單擊按鈕上運行3(帶線程)功能?
class Window(QtGui.QMainWindow):
def __init__(self):
super(Window, self).__init__() ...
def home(self):
self.saveThread = SaveThread()
self.convertThread = ConvertThread()
btn_convert.clicked.connect(self.convertThread.start)
btn_save.clicked.connect(self.saveThread.start)
btn_convert_save.clicked.connect(self.convert_and_save) ...
def convert_and_save(self):
self.open()
self.convertThread.start
self.saveThread.start
#self.convert()
#self.save_file()
class SaveThread(QtCore.QThread):
def __init__(self):
super(SaveThread, self).__init__()
def run(self):...
class ConvertThread(QtCore.QThread):
def __init__(self):
super(ConvertThread, self).__init__()
def run(self):...