- 把
ui文件
转换成py文件
C:Python27Libsite-packagesPyQt4uicpyuic.py -o t.py t.ui
- 使用ui布局
import sys
from PyQt4.QtGui import QApplication,QMainWindow
from t1 import *
app = QApplication(sys.argv)
mainWindow = QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(mainWindow)
mainWindow.show()
sys.exit(app.exec_())