PyQt实现button点击触发python文件中其他.py模块的运行
**将button点击触发运行想要连接的.py
Button 下添加
self.pushButton = QtWidgets.QPushButton(Dialog)
self.pushButton.setGeometry(QtCore.QRect(340, 30, 75, 23))
self.pushButton.setObjectName("pushButton")
self.pushButton.clicked.connect(self.train)
运行main.py模块里的主函数
def train(self):
main.main() # 调用main.py,进行train
print("train")