File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 26
26
QtCore = importlib .import_module (".QtCore" , libname )
27
27
QtGui = importlib .import_module (".QtGui" , libname )
28
28
QtWidgets = importlib .import_module (".QtWidgets" , libname )
29
- WinIdChange = QtCore .QEvent .WinIdChange
30
29
try :
30
+ # pyqt6
31
31
WA_PaintOnScreen = QtCore .Qt .WidgetAttribute .WA_PaintOnScreen
32
32
WA_DeleteOnClose = QtCore .Qt .WidgetAttribute .WA_DeleteOnClose
33
33
WA_InputMethodEnabled = QtCore .Qt .WidgetAttribute .WA_InputMethodEnabled
34
34
PreciseTimer = QtCore .Qt .TimerType .PreciseTimer
35
35
KeyboardModifiers = QtCore .Qt .KeyboardModifier
36
36
FocusPolicy = QtCore .Qt .FocusPolicy
37
37
Keys = QtCore .Qt .Key
38
+ WinIdChange = QtCore .QEvent .Type .WinIdChange
38
39
except AttributeError :
40
+ # pyside6
39
41
WA_PaintOnScreen = QtCore .Qt .WA_PaintOnScreen
40
42
WA_DeleteOnClose = QtCore .Qt .WA_DeleteOnClose
41
43
WA_InputMethodEnabled = QtCore .Qt .WA_InputMethodEnabled
42
44
PreciseTimer = QtCore .Qt .PreciseTimer
43
45
KeyboardModifiers = QtCore .Qt
44
46
FocusPolicy = QtCore .Qt
45
47
Keys = QtCore .Qt
48
+ WinIdChange = QtCore .QEvent .WinIdChange
46
49
else :
47
50
raise ImportError (
48
51
"Before importing rendercanvas.qt, import one of PySide6/PySide2/PyQt6/PyQt5 to select a Qt toolkit."
You can’t perform that action at this time.
0 commit comments