File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1087,6 +1087,11 @@ def _install():
10871087
10881088_install ()
10891089
1090+ # Setup Binding Enum states
1091+ Qt .IsPySide2 = Qt .__binding__ == 'PySide2'
1092+ Qt .IsPyQt5 = Qt .__binding__ == 'PyQt5'
1093+ Qt .IsPySide = Qt .__binding__ == 'PySide'
1094+ Qt .IsPyQt4 = Qt .__binding__ == 'PyQt4'
10901095
10911096"""Augment QtCompat
10921097
Original file line number Diff line number Diff line change @@ -407,6 +407,15 @@ def test_binding_and_qt_version():
407407 assert Qt .__qt_version__ != "0.0.0" , ("Qt version was not populated" )
408408
409409
410+ def test_binding_states ():
411+ """Tests to see if the Qt binding enum states are set properly"""
412+ import Qt
413+ assert Qt .IsPySide == binding ("PySide" )
414+ assert Qt .IsPySide2 == binding ("PySide2" )
415+ assert Qt .IsPyQt5 == binding ("PyQt5" )
416+ assert Qt .IsPyQt4 == binding ("PyQt4" )
417+
418+
410419def test_cli ():
411420 """Qt.py is available from the command-line"""
412421 env = os .environ .copy ()
You can’t perform that action at this time.
0 commit comments