QTest¶

PyQt5.QtTest.QTest

Description¶

TODO

Enums¶

KeyAction

This enum describes possible actions for key handling.

Member

Value

Description

Click

2

The key is clicked (pressed and released).

Press

0

The key is pressed.

Release

1

The key is released.

Shortcut

TODO

A shortcut is activated. This value has been added in Qt 5.6.

Methods¶

@staticmethod
keyClick(QWidget, Key, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyClick(QWidget, str, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyClick(QWindow, Key, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyClick(QWindow, str, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyClicks(QWidget, str, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyEvent(KeyAction, QWidget, Key, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyEvent(KeyAction, QWidget, str, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyEvent(KeyAction, QWindow, Key, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyEvent(KeyAction, QWindow, str, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyPress(QWidget, Key, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyPress(QWidget, str, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyPress(QWindow, Key, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyPress(QWindow, str, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyRelease(QWidget, Key, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyRelease(QWidget, str, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyRelease(QWindow, Key, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keyRelease(QWindow, str, modifier: Union[KeyboardModifiers, KeyboardModifier] = NoModifier, delay: int = -1)

TODO


@staticmethod
keySequence(QWidget, Union[QKeySequence, StandardKey, str, int])

TODO


@staticmethod
keySequence(QWindow, Union[QKeySequence, StandardKey, str, int])

TODO


@staticmethod
mouseClick(QWidget, MouseButton, modifier: Union[KeyboardModifiers, KeyboardModifier] = Qt.KeyboardModifiers(), pos: QPoint = QPoint(), delay: int = -1)

TODO


@staticmethod
mouseClick(QWindow, MouseButton, modifier: Union[KeyboardModifiers, KeyboardModifier] = Qt.KeyboardModifiers(), pos: QPoint = QPoint(), delay: int = -1)

TODO


@staticmethod
mouseDClick(QWidget, MouseButton, modifier: Union[KeyboardModifiers, KeyboardModifier] = Qt.KeyboardModifiers(), pos: QPoint = QPoint(), delay: int = -1)

TODO


@staticmethod
mouseDClick(QWindow, MouseButton, modifier: Union[KeyboardModifiers, KeyboardModifier] = Qt.KeyboardModifiers(), pos: QPoint = QPoint(), delay: int = -1)

TODO


@staticmethod
mouseMove(QWidget, pos: QPoint = QPoint(), delay: int = -1)

TODO


@staticmethod
mouseMove(QWindow, pos: QPoint = QPoint(), delay: int = -1)

TODO


@staticmethod
mousePress(QWidget, MouseButton, modifier: Union[KeyboardModifiers, KeyboardModifier] = Qt.KeyboardModifiers(), pos: QPoint = QPoint(), delay: int = -1)

TODO


@staticmethod
mousePress(QWindow, MouseButton, modifier: Union[KeyboardModifiers, KeyboardModifier] = Qt.KeyboardModifiers(), pos: QPoint = QPoint(), delay: int = -1)

TODO


@staticmethod
mouseRelease(QWidget, MouseButton, modifier: Union[KeyboardModifiers, KeyboardModifier] = Qt.KeyboardModifiers(), pos: QPoint = QPoint(), delay: int = -1)

TODO


@staticmethod
mouseRelease(QWindow, MouseButton, modifier: Union[KeyboardModifiers, KeyboardModifier] = Qt.KeyboardModifiers(), pos: QPoint = QPoint(), delay: int = -1)

TODO


@staticmethod
qSleep(int)

Sleeps for ms milliseconds, blocking execution of the test. will not do any event processing and leave your test unresponsive. Network communication might time out while sleeping. Use qWait() to do non-blocking sleeping.

ms must be greater than 0.

Note: The function calls either nanosleep() on unix or Sleep() on windows, so the accuracy of time spent in depends on the operating system.

Example:

# QTest::qSleep(250);

See also

qWait().


@staticmethod
qWait(int)

TODO


@staticmethod
qWaitForWindowActive(QWindow, timeout: int = 5000) → bool

TODO


@staticmethod
qWaitForWindowActive(QWidget, timeout: int = 5000) → bool

TODO


@staticmethod
qWaitForWindowExposed(QWindow, timeout: int = 5000) → bool

TODO


@staticmethod
qWaitForWindowExposed(QWidget, timeout: int = 5000) → bool

TODO


@staticmethod
touchEvent(QWidget, QTouchDevice) → QTouchEventSequence

TODO


@staticmethod
touchEvent(QWindow, QTouchDevice) → QTouchEventSequence

TODO