- class PySide6.QtGui.QInputEvent(type, m_dev[, modifiers=Qt.NoModifier])¶
Returns the source device that generated the original event.
In case of a synthesized event, for example a mouse event that was generated from a touch event,
device() continues to return the touchscreen device, so that you can tell that it did not come from an actual mouse. Thus
mouseEvent.source()->type() != QInputDevice::DeviceType::Mouse is one possible replacement for the Qt 5 expression
mouseEvent.source() == Qt::MouseEventSynthesizedByQt.
Returns the type of device that generated the event.
- Return type
Returns the keyboard modifier flags that existed immediately before the event occurred.
timestamp – int
- Return type
Returns the window system’s timestamp for this event. It will normally be in milliseconds since some arbitrary point in time, such as the time when the system was started.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.