6#include <QCoreApplication>
12# include <QPushButton>
13void example(QPointF &localPos, QPointF &globalPos, QObject *mainWindow, QObject app)
16 QMouseEvent event(QEvent::MouseButtonPress, localPos, globalPos, Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
17 QCoreApplication::sendEvent(mainWindow, &event);
21 QPushButton *quitButton =
new QPushButton(
"Quit");
22 QObject::connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection);
37 MyDebugTool* tool =
new MyDebugTool(QCoreApplication::instance());
38 QCoreApplication::instance()->installEventFilter(tool);
41Q_COREAPP_STARTUP_FUNCTION(preRoutineMyDebugTool)
79 MyPrivateInitStuff(QObject *parent)
92 const char *comment =
nullptr);
static MyPrivateInitStuff * initStuff(QObject *parent)
static void cleanup_ptr()
static QString tr(const char *sourceText, const char *comment=nullptr)
[5]
static void preRoutineMyDebugTool()
[3]
static int * global_ptr
[3]