start v1 fix
This commit is contained in:
16
start.py
16
start.py
@@ -1,12 +1,25 @@
|
||||
# v1.0.3 start.py
|
||||
import os
|
||||
|
||||
os.environ["QT_ENABLE_HIGHDPI_SCALING"] = "1"
|
||||
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
|
||||
|
||||
import signal
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtGui import QGuiApplication
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
|
||||
from core.app import StickyNoteApp
|
||||
|
||||
|
||||
QGuiApplication.setHighDpiScaleFactorRoundingPolicy(
|
||||
Qt.HighDpiScaleFactorRoundingPolicy.PassThrough
|
||||
)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||
|
||||
@@ -17,6 +30,7 @@ def main() -> int:
|
||||
|
||||
try:
|
||||
return app.exec()
|
||||
|
||||
except KeyboardInterrupt:
|
||||
try:
|
||||
window.safe_exit()
|
||||
@@ -24,8 +38,10 @@ def main() -> int:
|
||||
traceback.print_exc()
|
||||
|
||||
return 0
|
||||
|
||||
except SystemExit:
|
||||
return 0
|
||||
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user