Files
MediaCast4/main.py
2026-01-15 10:02:04 +08:00

29 lines
595 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# main.py
import os
import sys
from PyQt5.QtWidgets import QApplication
# 获取当前文件所在目录main.py所在目录
current_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, current_dir) # 添加当前目录到搜索路径
from ui.main_window import MainWindow
def main():
"""应用主函数"""
app = QApplication(sys.argv)
# 设置应用样式
app.setStyle("Fusion")
# 创建并显示主窗口
window = MainWindow()
window.show()
# 启动应用事件循环
sys.exit(app.exec_())
if __name__ == "__main__":
main()