mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
avoid printing compat warning on Qt5
This commit is contained in:
parent
94001273cc
commit
20c1a3af56
1 changed files with 4 additions and 2 deletions
|
@ -10,13 +10,15 @@ import traceback
|
||||||
from typing import Callable, Union
|
from typing import Callable, Union
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
import PyQt6
|
||||||
|
except:
|
||||||
|
from .qt5 import * # type: ignore
|
||||||
|
else:
|
||||||
if not os.getenv("DISABLE_QT5_COMPAT"):
|
if not os.getenv("DISABLE_QT5_COMPAT"):
|
||||||
print("Running with temporary Qt5 compatibility shims.")
|
print("Running with temporary Qt5 compatibility shims.")
|
||||||
print("Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.")
|
print("Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.")
|
||||||
from . import qt5_compat # needs to be imported first
|
from . import qt5_compat # needs to be imported first
|
||||||
from .qt6 import *
|
from .qt6 import *
|
||||||
except:
|
|
||||||
from .qt5 import * # type: ignore
|
|
||||||
|
|
||||||
from anki.utils import isMac, isWin
|
from anki.utils import isMac, isWin
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue