Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qtestsupport_widgets.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QTESTSUPPORT_WIDGETS_H
5#define QTESTSUPPORT_WIDGETS_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtGui/qtestsupport_gui.h>
9
11
12class QPointingDevice;
13class QWidget;
14
15namespace QTest {
16
17[[nodiscard]] Q_WIDGETS_EXPORT bool qWaitForWindowActive(QWidget *widget, int timeout = 5000);
18[[nodiscard]] Q_WIDGETS_EXPORT bool qWaitForWindowExposed(QWidget *widget, int timeout = 5000);
19
20class Q_WIDGETS_EXPORT QTouchEventWidgetSequence : public QTouchEventSequence
21{
22public:
24 QTouchEventWidgetSequence& press(int touchId, const QPoint &pt, QWidget *widget = nullptr);
25 QTouchEventWidgetSequence& move(int touchId, const QPoint &pt, QWidget *widget = nullptr);
26 QTouchEventWidgetSequence& release(int touchId, const QPoint &pt, QWidget *widget = nullptr);
27 QTouchEventWidgetSequence& stationary(int touchId) override;
28
29 bool commit(bool processEvents = true) override;
30
31private:
32 QTouchEventWidgetSequence(QWidget *widget, QPointingDevice *aDevice, bool autoCommit);
33
34 QPoint mapToScreen(QWidget *widget, const QPoint &pt);
35
36 QWidget *targetWidget = nullptr;
37
39};
40
41} // namespace QTest
42
44
45#endif
IOBluetoothDevice * device
\inmodule QtCore\reentrant
Definition qpoint.h:23
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
friend QTouchEventWidgetSequence touchEvent(QWidget *widget, QPointingDevice *device, bool autoCommit)
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QOpenGLWidget * widget
[1]
Combined button and popup list for selecting options.
Q_GUI_EXPORT bool qWaitForWindowActive(QWindow *window, int timeout=5000)
Q_GUI_EXPORT bool qWaitForWindowExposed(QWindow *window, int timeout=5000)
GLint GLint GLint GLint GLsizei GLsizei GLsizei GLboolean commit
GLbitfield GLuint64 timeout
[4]
sem release()