Helper class to write Qt widget unittests.
Mimic QTest.qWaitForWindowExposed for Qt4.
Waits until the window is shown in the screen.
It also activates the window and raises it.
See QTest.qWaitForWindowExposed for details.
Base class to write test for Qt stuff.
It creates a QApplication before running the tests. WARNING: The QApplication is shared by all tests, which might have side effects.
After each test, this class is checking for widgets remaining alive. To allow some widgets to remain alive at the end of a test, set the allowedLeakingWidgets attribute to the number of widgets that can remain alive at the end of the test. With PySide, this test is not run for now as it seems PySide is leaking widgets internally.
Default timeout for qWait
Extra timeout in millisecond to add to qSleep, qWait and qWaitForWindowExposed.
Intended purpose is for debugging, to add extra time to waits in order to allow to view the tested widgets.
Key press action code
Key release action code
Key click action code
The Qt QTest class from the used Qt binding.
Simulate clicking a key.
See QTest.keyClick for details.
Simulate clicking a sequence of keys.
See QTest.keyClick for details.
Sends a Qt key event.
See QTest.keyEvent for details.
Sends a Qt key press event.
See QTest.keyPress for details.
Sends a Qt key release event.
See QTest.keyRelease for details.
Simulate clicking a mouse button.
See QTest.mouseClick for details.
Simulate double clicking a mouse button.
See QTest.mouseDClick for details.
Simulate moving the mouse.
See QTest.mouseMove for details.
Simulate pressing a mouse button.
See QTest.mousePress for details.
Simulate releasing a mouse button.
See QTest.mouseRelease for details.
Sleep for ms milliseconds, blocking the execution of the test.
See QTest.qSleep for details.