改 相对路径 完成客户端
This commit is contained in:
14
etl_billiards/gui/resources/__init__.py
Normal file
14
etl_billiards/gui/resources/__init__.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""GUI 资源模块"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
RESOURCES_DIR = Path(__file__).parent
|
||||
STYLES_PATH = RESOURCES_DIR / "styles.qss"
|
||||
|
||||
|
||||
def load_stylesheet() -> str:
|
||||
"""加载样式表"""
|
||||
if STYLES_PATH.exists():
|
||||
return STYLES_PATH.read_text(encoding="utf-8")
|
||||
return ""
|
||||
Reference in New Issue
Block a user