toolbar: fix the default values
[git-cola.git] / qtpy / QtTest.py
blobcca5e1922885c34e786756b1381f6abb2bdff40d
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 . import PYQT5,PYSIDE2, PYQT4, PYSIDE, PythonQtError
16 if PYQT5:
17 from PyQt5.QtTest import QTest
18 elif PYSIDE2:
19 from PySide2.QtTest import QTest
20 elif PYQT4:
21 from PyQt4.QtTest import QTest as OldQTest
23 class QTest(OldQTest):
24 @staticmethod
25 def qWaitForWindowActive(QWidget):
26 OldQTest.qWaitForWindowShown(QWidget)
27 elif PYSIDE:
28 from PySide.QtTest import QTest
29 else:
30 raise PythonQtError('No Qt bindings could be found')