File: QtTest.py

package info (click to toggle)
git-cola 3.12.0-2
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 5,228 kB
  • sloc: python: 30,007; makefile: 377; sh: 310; tcl: 62; xml: 32
file content (30 lines) | stat: -rw-r--r-- 705 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -*- coding: utf-8 -*-
#
# Copyright © 2014-2015 Colin Duquesnoy
# Copyright © 2009- The Spyder Developmet Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)

"""
Provides QtTest and functions
"""

from . import PYQT5,PYSIDE2, PYQT4, PYSIDE, PythonQtError


if PYQT5:
    from PyQt5.QtTest import QTest
elif PYSIDE2:
    from PySide2.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')