
from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError


if PYQT5:
    from PyQt5.QtTest import QTest
elif PYQT4:
    from PyQt4.QtTest import QTest as OldQTest

    class QTest(OldQTest):
        @staticmethod
        def qWaitForWindowActive(QWidget):
            OldQTest.qWaitForWindowShown(QWidget)
elif PYSIDE:
    raise ImportError('QtTest support is incomplete for PySide')
else:
    raise PythonQtError('No Qt bindings could be found')


from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError


if PYQT5:
    from PyQt5.QtTest import QTest
elif PYQT4:
    from PyQt4.QtTest import QTest as OldQTest

    class QTest(OldQTest):
        @staticmethod
        def qWaitForWindowActive(QWidget):
            OldQTest.qWaitForWindowShown(QWidget)
elif PYSIDE:
    from PySide.QtTest import QTest
else:
    raise PythonQtError('No Qt bindings could be found')

Add support for QTest with PySide
Add support for QTest with PySide
  
  from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError
  
  
  if PYQT5:
      from PyQt5.QtTest import QTest
  elif PYQT4:
      from PyQt4.QtTest import QTest as OldQTest
  
      class QTest(OldQTest):
          @staticmethod
          def qWaitForWindowActive(QWidget):
              OldQTest.qWaitForWindowShown(QWidget)
  elif PYSIDE:
-     raise ImportError('QtTest support is incomplete for PySide')
+     from PySide.QtTest import QTest
  else:
      raise PythonQtError('No Qt bindings could be found')
  
Add support for QTest with PySide
## Code Before:

from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError


if PYQT5:
    from PyQt5.QtTest import QTest
elif PYQT4:
    from PyQt4.QtTest import QTest as OldQTest

    class QTest(OldQTest):
        @staticmethod
        def qWaitForWindowActive(QWidget):
            OldQTest.qWaitForWindowShown(QWidget)
elif PYSIDE:
    raise ImportError('QtTest support is incomplete for PySide')
else:
    raise PythonQtError('No Qt bindings could be found')

## Instruction:
Add support for QTest with PySide
## Code After:

from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError


if PYQT5:
    from PyQt5.QtTest import QTest
elif PYQT4:
    from PyQt4.QtTest import QTest as OldQTest

    class QTest(OldQTest):
        @staticmethod
        def qWaitForWindowActive(QWidget):
            OldQTest.qWaitForWindowShown(QWidget)
elif PYSIDE:
    from PySide.QtTest import QTest
else:
    raise PythonQtError('No Qt bindings could be found')
