-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
46 lines (36 loc) · 1.16 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"""
PyQt6ify Pro - Main Application Entry Point
"""
import sys
import os
from loguru import logger
from PyQt6.QtWidgets import QApplication
from modules.config.config import Config
from modules.core.main_window import MainWindow
def setup_logging():
"""Configure logging settings."""
logger.add("logs/debug.log",
rotation="500 MB",
retention="10 days",
level="DEBUG")
def main():
"""Main application entry point."""
try:
# Initialize logging
setup_logging()
logger.info("Starting PyQt6ify Pro")
# Load configuration first
config = Config()
# Create application instance with dark theme style
os.environ['QT_STYLE_OVERRIDE'] = 'Fusion' # Use Fusion style which works well with custom themes
app = QApplication(sys.argv)
# Create and show main window
window = MainWindow(config)
window.show() # Make sure to show the window
# Start event loop
sys.exit(app.exec())
except Exception as e:
logger.error(f"Application startup failed: {str(e)}")
sys.exit(1)
if __name__ == '__main__':
main()