Obsolete Members for QMouseEvent

The following members of class QMouseEvent are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Functions

(obsolete) Qt::MouseEventSource source() const

Member Function Documentation

[since 5.3] Qt::MouseEventSource QMouseEvent::source() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

in 6.0: use pointingDevice()

Returns information about the mouse event source.

The mouse event source can be used to distinguish between genuine and artificial mouse events. The latter are events that are synthesized from touch events by the operating system or Qt itself. This enum tells you from where it was synthesized; but often it's more useful to know from which device it was synthesized, so try to use pointingDevice() instead.

Note: Many platforms provide no such information. On such platforms Qt::MouseEventNotSynthesized is returned always.

This function was introduced in Qt 5.3.

See also Qt::MouseEventSource and QGraphicsSceneMouseEvent::source().