avoid printing compat warning on Qt5

This commit is contained in:
Damien Elmes 2021-10-29 19:29:12 +10:00
parent 94001273cc
commit 20c1a3af56

View File

@ -10,13 +10,15 @@ import traceback
from typing import Callable, Union
try:
import PyQt6
except:
from .qt5 import * # type: ignore
else:
if not os.getenv("DISABLE_QT5_COMPAT"):
print("Running with temporary Qt5 compatibility shims.")
print("Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.")
from . import qt5_compat # needs to be imported first
from .qt6 import *
except:
from .qt5 import * # type: ignore
from anki.utils import isMac, isWin