python ui转py的时候需要加上一点代码不然没反应
import sys
from PyQt5.QtWidgets import QApplication, QMainWindow
import test # module test.py
if __name__ == '__main__':
app = QApplication(sys.argv)
myMainWindow = QMainWindow()
myUi = test.Ui_MainWindow()
myUi.setupUi(myMainWindow)
myMainWindow.show()
sys.exit(app.exec_())