-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
50 lines (37 loc) · 1.04 KB
/
Copy pathapp.py
File metadata and controls
50 lines (37 loc) · 1.04 KB
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
47
48
49
50
"""
app.py - Entry point for Smart Study Distraction Blocker
Run with:
python app.py
Requirements:
pip install -r requirements.txt
"""
import sys
import logging
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import Qt
# Configure logging
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
handlers=[
logging.StreamHandler(sys.stdout),
]
)
logger = logging.getLogger(__name__)
def main():
logger.info("Starting Smart Study Distraction Blocker")
app = QApplication(sys.argv)
app.setApplicationName("Smart Study Distraction Blocker")
app.setOrganizationName("StudyBlocker")
# High-DPI support (attribute names vary by PyQt5 version)
try:
app.setAttribute(Qt.AA_EnableHighDpiScaling, True)
app.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
except AttributeError:
pass
from gui import MainWindow
window = MainWindow()
window.show()
sys.exit(app.exec_())
if __name__ == "__main__":
main()