git-cola v2.7
[git-cola.git] / extras / qtpy / qtpy / QtTest.py
blob6d59c76506fc8afe2f69ae53f2e139c37cc6032f
1 # -*- coding: utf-8 -*-
3 # Copyright © 2014-2015 Colin Duquesnoy
4 # Copyright © 2009- The Spyder Developmet Team
6 # Licensed under the terms of the MIT License
7 # (see LICENSE.txt for details)
9 """
10 Provides QtTest and functions
11 """
13 from qtpy import PYQT5, PYQT4, PYSIDE, PythonQtError
16 if PYQT5:
17 from PyQt5.QtTest import QTest
18 elif PYQT4:
19 from PyQt4.QtTest import QTest as OldQTest
21 class QTest(OldQTest):
22 @staticmethod
23 def qWaitForWindowActive(QWidget):
24 OldQTest.qWaitForWindowShown(QWidget)
25 elif PYSIDE:
26 from PySide.QtTest import QTest
27 else:
28 raise PythonQtError('No Qt bindings could be found')