# -*- coding:utf-8 -*- import _load import sys from GUIWindows import Window from PySide6.QtWidgets import QApplication from PySide6 import QtWidgets from PySide6.QtGui import QIcon from pathlib import Path path = Path(__file__) ico_file_patch = path.parent.parent / "images" / "bjx.png" css_file_patch = path.parent.parent / "ui" / "style.qss" if __name__ == '__main__': app = QApplication([]) app.setStyle("Fusion") app.setWindowIcon(QIcon(str(ico_file_patch))) # 样式 # print(QtWidgets.QStyleFactory.keys()) # print(app.style().name()) with open(css_file_patch,"r") as cssfile: _style = cssfile.read() app.setStyleSheet(_style) win = Window() win.ui.show() sys.exit(app.exec())