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"""
10Provides QtTest and functions
11"""
12
13from . import PYQT5,PYSIDE2, PYQT4, PYSIDE, PythonQtError
14
15
16if PYQT5:
17    from PyQt5.QtTest import QTest
18elif PYSIDE2:
19    from PySide2.QtTest import QTest
20elif PYQT4:
21    from PyQt4.QtTest import QTest as OldQTest
22
23    class QTest(OldQTest):
24        @staticmethod
25        def qWaitForWindowActive(QWidget):
26            OldQTest.qWaitForWindowShown(QWidget)
27elif PYSIDE:
28    from PySide.QtTest import QTest
29else:
30    raise PythonQtError('No Qt bindings could be found')
31