.UI编译成.py后,无法运行,求指导下
1 .UI编译成.py后,无法运行,网上搜索了一下,要用到pyside2类库,python3.12安装不上它2 网上搜索了一下,解决.ui编译后.py ,最好是调用 .UI 或 编译后的.py ,有啥好办法呢
import sys from PySide6.QtWidgets import QApplication, QMainWindow from PySide6.QtCore import QFile from ui_mainwindow import Ui_MainWindow class MainWindow(QMainWindow): def __init__(self): super(MainWindow, self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) if __name__ == "__main__": app = QApplication(sys.argv) window = MainWindow() window.show() sys.exit(app.exec())