File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 4545 QMouseEventTransition ,
4646 )
4747elif PYQT6 :
48- from PyQt6 .QtStateMachine import *
48+ from PyQt6 .QtCore import PYQT_VERSION_STR
49+
50+ if int (PYQT_VERSION_STR .split ("." )[1 ]) >= 9 :
51+ from PyQt6 .QtStateMachine import *
52+ else :
53+ from . import QtBindingInNewerVersionError
54+
55+ raise QtBindingInNewerVersionError (name = "QtStateMachine" )
4956elif PYSIDE6 :
5057 from PySide6 .QtStateMachine import *
Original file line number Diff line number Diff line change @@ -125,6 +125,12 @@ class QtBindingMissingModuleError(QtModuleNotFoundError):
125125 _msg_extra = "It is not currently implemented in {binding}."
126126
127127
128+ class QtBindingInNewerVersionError (QtModuleNotFoundError ):
129+ """Raised when a module is only supported in newer versions of a binding."""
130+
131+ _msg_extra = "It is only available in newer versions of {binding}."
132+
133+
128134class QtModuleNotInstalledError (QtModuleNotFoundError ):
129135 """Raise when a module is supported by the binding, but not installed."""
130136
You can’t perform that action at this time.
0 commit comments