Switch app code to PyQt6

This commit is contained in:
Veronica Berglyd Olsen
2025-01-11 20:15:32 +01:00
parent 3ec210df9b
commit 40c4e74d48
64 changed files with 218 additions and 223 deletions
+16 -16
View File
@@ -29,7 +29,7 @@ import sys
from typing import TYPE_CHECKING
from PyQt5.QtWidgets import QApplication, QErrorMessage
from PyQt6.QtWidgets import QApplication, QErrorMessage
from novelwriter.config import Config
from novelwriter.error import exceptionHandler
@@ -201,21 +201,21 @@ def main(sysArgs: list | None = None) -> GuiMain | None:
# Check Packages and Versions
errorData = []
errorCode = 0
if sys.hexversion < 0x030a00f0:
errorData.append(
"At least Python 3.10 is required, found %s" % CONFIG.verPyString
)
errorCode |= 0x04
if CONFIG.verQtValue < 0x050f00:
errorData.append(
"At least Qt5 version 5.15.0 is required, found %s" % CONFIG.verQtString
)
errorCode |= 0x08
if CONFIG.verPyQtValue < 0x050f00:
errorData.append(
"At least PyQt5 version 5.15.0 is required, found %s" % CONFIG.verPyQtString
)
errorCode |= 0x10
# if sys.hexversion < 0x030a00f0:
# errorData.append(
# "At least Python 3.10 is required, found %s" % CONFIG.verPyString
# )
# errorCode |= 0x04
# if CONFIG.verQtValue < 0x060000:
# errorData.append(
# "At least Qt6 version 6.0 is required, found %s" % CONFIG.verQtString
# )
# errorCode |= 0x08
# if CONFIG.verPyQtValue < 0x060000:
# errorData.append(
# "At least PyQt6 version 6.0 is required, found %s" % CONFIG.verPyQtString
# )
# errorCode |= 0x10
if errorData:
errApp = QApplication([])