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
qtestkeyboard.h File Reference

(df9d882d41b741fef7c5beeddb0abe9d904443d8)

#include <QtTest/qtestassert.h>
#include <QtTest/qttestglobal.h>
#include <QtTest/qtestsystem.h>
#include <QtTest/qtestspontaneevent.h>
#include <QtCore/qpointer.h>
#include <QtGui/qguiapplication.h>
#include <QtGui/qwindow.h>
#include <QtGui/qevent.h>
+ Include dependency graph for qtestkeyboard.h:

Go to the source code of this file.

Namespaces

namespace  QTest
 [15]
 

Enumerations

enum  QTest::KeyAction { QTest::Press , QTest::Release , QTest::Click , QTest::Shortcut }
 

Functions

QT_BEGIN_NAMESPACE Q_GUI_EXPORT void qt_handleKeyEvent (QWindow *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
 
Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent (QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString &text=QString(), bool autorep=false, ushort count=1)
 
static void QTest::simulateEvent (QWindow *window, bool press, int code, Qt::KeyboardModifiers modifier, QString text, bool repeat, int delay=-1)
 
static void QTest::sendKeyEvent (KeyAction action, QWindow *window, Qt::Key code, QString text, Qt::KeyboardModifiers modifier, int delay=-1)
 
static void QTest::sendKeyEvent (KeyAction action, QWindow *window, Qt::Key code, char ascii, Qt::KeyboardModifiers modifier, int delay=-1)
 
static void QTest::keyEvent (KeyAction action, QWindow *window, char ascii, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1)
 
static void QTest::keyEvent (KeyAction action, QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1)
 
static void QTest::keyClick (QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1)
 
static void QTest::keyClick (QWindow *window, char key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1)
 
static void QTest::keyRelease (QWindow *window, char key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1)
 
static void QTest::keyRelease (QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1)
 
static void QTest::keyPress (QWindow *window, char key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1)
 
static void QTest::keyPress (QWindow *window, Qt::Key key, Qt::KeyboardModifiers modifier=Qt::NoModifier, int delay=-1)
 

Function Documentation

◆ qt_handleKeyEvent()

QT_BEGIN_NAMESPACE Q_GUI_EXPORT void qt_handleKeyEvent ( QWindow * w,
QEvent::Type t,
int k,
Qt::KeyboardModifiers mods,
const QString & text = QString(),
bool autorep = false,
ushort count = 1 )

Definition at line 1164 of file qwindowsysteminterface.cpp.

References QWindowSystemInterfacePrivate::eventTime, QWindowSystemInterface::handleShortcutEvent(), QEvent::KeyPress, text, and window().

Referenced by QTest::simulateEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_sendShortcutOverrideEvent()

Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent ( QObject * o,
ulong timestamp,
int k,
Qt::KeyboardModifiers mods,
const QString & text = QString(),
bool autorep = false,
ushort count = 1 )

Definition at line 1176 of file qwindowsysteminterface.cpp.