add a flag to disable PyQt5 compat

This commit is contained in:
Damien Elmes 2021-10-29 09:58:10 +10:00
parent 21c03f67d0
commit b1dda8db64

View file

@ -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