Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
doc_src_qtestevent.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QTest>
5#include <QLineEdit>
6
8
10{
11QWidget *myParent = nullptr;
13QTestEventList events;
14events.addKeyClick('a');
15events.addKeyClick(Qt::Key_Backspace);
16events.addDelay(200);
17QLineEdit *lineEdit = new QLineEdit(myParent);
18// ...
19events.simulate(lineEdit);
20events.simulate(lineEdit);
22}
The QLineEdit widget is a one-line text editor.
Definition qlineedit.h:28
void addDelay(int msecs)
Definition qtestevent.h:179
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
void testGui_data()
@ Key_Backspace
Definition qnamespace.h:666
QLineEdit * lineEdit