You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
705 B

4 years ago
  1. # -*- coding: utf-8 -*-
  2. #
  3. # Copyright © 2014-2015 Colin Duquesnoy
  4. # Copyright © 2009- The Spyder Developmet Team
  5. #
  6. # Licensed under the terms of the MIT License
  7. # (see LICENSE.txt for details)
  8. """
  9. Provides QtTest and functions
  10. """
  11. from . import PYQT5,PYSIDE2, PYQT4, PYSIDE, PythonQtError
  12. if PYQT5:
  13. from PyQt5.QtTest import QTest
  14. elif PYSIDE2:
  15. from PySide2.QtTest import QTest
  16. elif PYQT4:
  17. from PyQt4.QtTest import QTest as OldQTest
  18. class QTest(OldQTest):
  19. @staticmethod
  20. def qWaitForWindowActive(QWidget):
  21. OldQTest.qWaitForWindowShown(QWidget)
  22. elif PYSIDE:
  23. from PySide.QtTest import QTest
  24. else:
  25. raise PythonQtError('No Qt bindings could be found')