27 lines
600 B
Python
27 lines
600 B
Python
#!/usr/bin/env python
|
|
"""
|
|
配置编辑器使用演示
|
|
"""
|
|
import sys
|
|
import os
|
|
|
|
# 添加项目路径
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
from PyQt5.QtWidgets import QApplication
|
|
from src.ui.config_editor import ConfigEditorWindow
|
|
|
|
def main():
|
|
app = QApplication(sys.argv)
|
|
|
|
# 编辑 config.json
|
|
config_file = os.path.join(os.path.dirname(__file__), "config", "config.json")
|
|
|
|
editor = ConfigEditorWindow(config_file)
|
|
editor.setWindowTitle("配置文件编辑器 - 演示")
|
|
|
|
sys.exit(editor.exec_())
|
|
|
|
if __name__ == "__main__":
|
|
main()
|