WIP (not working) : désactivation async et passage à full qt

This commit is contained in:
2025-05-24 11:29:32 +02:00
parent be72749b53
commit f442e334d0
14 changed files with 269 additions and 949 deletions

17
main.py
View File

@@ -3,9 +3,7 @@ from PySide6.QtGui import QPalette, QColor
from PySide6.QtNetwork import QLocalServer, QLocalSocket
from PySide6.QtWidgets import QApplication
import qasync
import sys
import asyncio
import os
import argparse
import logging
@@ -189,15 +187,6 @@ if __name__ == "__main__":
logger.info("Instance secondaire détectée, fermeture de l'application")
sys.exit(0)
# Configuration de la boucle d'événements asyncio
logger.debug("Configuration de la boucle d'événements asyncio")
event_loop = qasync.QEventLoop(app)
asyncio.set_event_loop(event_loop)
app_close_event = asyncio.Event()
app.aboutToQuit.connect(app_close_event.set)
logger.debug("Signal aboutToQuit connecté à l'événement de fermeture")
# Création de la fenêtre principale
logger.info("Création de la fenêtre principale")
window = MainWindow()
@@ -215,9 +204,5 @@ if __name__ == "__main__":
window.show()
logger.info("Fenêtre principale affichée")
# Exécution de la boucle d'événements
logger.debug("Démarrage de la boucle d'événements")
with event_loop:
event_loop.run_until_complete(app_close_event.wait())
logger.info("Application terminée")
sys.exit(app.exec())