Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef MOUSEPOSSETTER_H
- #define MOUSEPOSSETTER_H
- #include <QObject>
- #include <QCursor>
- class MousePosSetter : public QObject
- {
- Q_OBJECT
- public:
- explicit MousePosSetter(QObject *parent = nullptr);
- // Q_INVOKABLE void set(int x, int y) { QCursor::setPos(x, y); }
- Q_INVOKABLE void set(qreal x, qreal y) { QCursor::setPos(qRound(x), qRound(y)); }
- signals:
- };
- #endif // MOUSEPOSSETTER_H
Advertisement
Add Comment
Please, Sign In to add comment