mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
add a flag to disable PyQt5 compat
This commit is contained in:
parent
21c03f67d0
commit
b1dda8db64
1 changed files with 4 additions and 1 deletions
|
@ -10,7 +10,10 @@ import traceback
|
||||||
from typing import Callable, Union
|
from typing import Callable, Union
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from . import compat # needs to be imported first
|
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 compat # needs to be imported first
|
||||||
from .qt6 import *
|
from .qt6 import *
|
||||||
except:
|
except:
|
||||||
from .qt5 import * # type: ignore
|
from .qt5 import * # type: ignore
|
||||||
|
|
Loading…
Reference in a new issue