修改变量名
This commit is contained in:
4
main.py
4
main.py
@@ -4,10 +4,10 @@ import module.resources
|
||||
from PySide6.QtWidgets import QApplication
|
||||
|
||||
from ui.main import MainWindow
|
||||
from utils.function import DEVELOPMENT_ENV
|
||||
from utils.function import RELEASE_ENV
|
||||
|
||||
if __name__ == '__main__':
|
||||
if DEVELOPMENT_ENV:
|
||||
if RELEASE_ENV:
|
||||
import pyi_splash
|
||||
|
||||
pyi_splash.update_text('正在启动...')
|
||||
|
||||
@@ -7,7 +7,7 @@ from ui.pyui.achievement_ui import AchievementWidget
|
||||
from ui.pyui.defense_ui import DefenseWidget
|
||||
from ui.pyui.picker_ui import PickerWidget
|
||||
from ui.pyui.test_ui import TestWidget
|
||||
from utils.function import DEVELOPMENT_ENV
|
||||
from utils.function import RELEASE_ENV
|
||||
|
||||
|
||||
class MainWindow(MSFluentWindow):
|
||||
@@ -21,7 +21,7 @@ class MainWindow(MSFluentWindow):
|
||||
self.defenseInterface = DefenseWidget('Defense Interface', self)
|
||||
self.aboutInterface = AboutWidget('About Interface', self)
|
||||
self.pickerInterface = PickerWidget('Picker Interface', self)
|
||||
if not DEVELOPMENT_ENV:
|
||||
if not RELEASE_ENV:
|
||||
self.testInterface = TestWidget('Test Interface', self)
|
||||
|
||||
self.achievementInterface.error.connect(self.showError)
|
||||
@@ -35,7 +35,7 @@ class MainWindow(MSFluentWindow):
|
||||
self.addSubInterface(self.achievementInterface, FluentIcon.SPEED_HIGH, '达成度')
|
||||
self.addSubInterface(self.defenseInterface, FluentIcon.FEEDBACK, '答辩题目')
|
||||
self.addSubInterface(self.pickerInterface, FluentIcon.PEOPLE, '提问')
|
||||
if not DEVELOPMENT_ENV:
|
||||
if not RELEASE_ENV:
|
||||
self.addSubInterface(self.testInterface, FluentIcon.VIEW, '测试')
|
||||
|
||||
self.addSubInterface(self.aboutInterface, FluentIcon.INFO, '关于', position=NavigationItemPosition.BOTTOM)
|
||||
@@ -53,7 +53,7 @@ class MainWindow(MSFluentWindow):
|
||||
|
||||
def showEvent(self, event: QShowEvent):
|
||||
super().showEvent(event)
|
||||
if DEVELOPMENT_ENV:
|
||||
if RELEASE_ENV:
|
||||
import pyi_splash
|
||||
pyi_splash.update_text('正在加载...')
|
||||
pyi_splash.close()
|
||||
|
||||
@@ -222,4 +222,4 @@ def open_template(file_name: str, widget: QWidget) -> None:
|
||||
)
|
||||
|
||||
|
||||
DEVELOPMENT_ENV = getattr(sys, 'frozen', False)
|
||||
RELEASE_ENV = getattr(sys, 'frozen', False)
|
||||
|
||||
Reference in New Issue
Block a user