You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
from PyQt5 . QtWidgets import QApplication , QStyleFactory
from UI . Main . Main import MainWindow , CommonHelper
from utils import Globals
from model . ClientModel . Client import Client
from UI . RegisterWidgets . RegisterWidget import RegisterWidget
from model . ClientModel . RegisterManage import Register
# import Static.staticQrc_rc # 导入资源文件
import sys
import logging
# 设置 modbus_tk 日志级别为 ERROR, 避免过多的调试信息和格式化错误
logging . getLogger ( ' modbus_tk ' ) . setLevel ( logging . ERROR )
if __name__ == ' __main__ ' :
app = QApplication ( sys . argv )
app . setStyle ( QStyleFactory . create ( ' Fusion ' ) )
app . setStyleSheet ( CommonHelper . readQss ( ' Static/Main.qss ' )
+ CommonHelper . readQss ( ' Static/profibus.qss ' )
+ CommonHelper . readQss ( ' Static/Area.qss ' ) )
reg = Register ( )
if not reg . checkLicense ( ) :
regWidget = RegisterWidget ( )
regWidget . show ( )
else :
Globals . _init ( )
Client . initDB ( )
ex = MainWindow ( )
Globals . setValue ( ' MainWindow ' , ex )
ex . show ( )
sys . exit ( app . exec_ ( ) )