QTestEventList Class
The QTestEventList class provides a list of GUI events. More...
Header: | #include <QTestEventList> |
qmake: | QT += testlib |
Inherits: | QList |
Detailed Description
A QTestEventList can be populated with GUI events that can be stored as test data for later usage, or be replayed on any QWidget. QTestEventList provides convenience functions for populating the list.
Example:
QTestEventList events; events.addKeyClick('a'); events.addKeyClick(Qt::Key_Backspace); events.addDelay(200); QLineEdit *lineEdit = new QLineEdit(myParent); ... events.simulate(lineEdit); events.simulate(lineEdit);
The example above simulates the user entering the character a
followed by a backspace, waiting for 200 milliseconds and repeating it.