1、模拟GUI事件函数
1.1 QTest::keyClicks():模拟键盘连续输入
原型:
void QTest::keyClicks(QWidget *widget, const QString &sequence, Qt::KeyboardModifiers modifier = Qt::NoModifier, int delay = -1)
说明:模拟连续敲击键盘输入,delay 为两次敲击的间隔,单位为毫米
示例:
void testSerial::testGui1()
{QLineEdit lineEdit;QTest::keyClicks(&lineE