PythonQt.QtGui.QMouseEvent · declarations 001
Back to PythonQt.QtGui.QMouseEvent
button
button() -> Any
X.button()
Supplemental documentation: Qt 5 reference:
Qt::MouseButton QMouseEvent::button() const
Returns the button that caused the event.
Note that the returned value is always Qt::NoButton for mouse move events.
See also buttons() and Qt::MouseButton.
Upstream PySide2 reference signatures (binding differences may apply):
button(self) -> PySide2.QtCore.Qt.MouseButton
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#button
buttons
buttons() -> Any
X.buttons()
Supplemental documentation: Qt 5 reference:
Qt::MouseButtons QMouseEvent::buttons() const
Returns the button state when the event was generated. The button state is a combination of Qt::LeftButton, Qt::RightButton, Qt::MiddleButton using the OR operator. For mouse move events, this is all buttons that are pressed down. For mouse press and double click events this includes the button that caused the event. For mouse release events this excludes the button that caused the event.
See also button() and Qt::MouseButton.
Upstream PySide2 reference signatures (binding differences may apply):
buttons(self) -> PySide2.QtCore.Qt.MouseButtons
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#buttons
flags
flags() -> Any
X.flags()
Supplemental documentation: Qt 5 reference:
Qt::MouseEventFlags QMouseEvent::flags() const
Returns the mouse event flags.
The mouse event flags provide additional information about a mouse event.
This function was introduced in Qt 5.3.
See also Qt::MouseEventFlag and QGraphicsSceneMouseEvent::flags().
Upstream PySide2 reference signatures (binding differences may apply):
flags(self) -> PySide2.QtCore.Qt.MouseEventFlags
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#flags
globalPos
globalPos() -> Any
X.globalPos() -> PythonQt.QtCore.QPoint
Supplemental documentation: Qt 5 reference:
QPoint QMouseEvent::globalPos() const
Returns the global position of the mouse cursor at the time of the event. This is important on asynchronous window systems like X11. Whenever you move your widgets around in response to mouse events, globalPos() may differ a lot from the current pointer position QCursor::pos(), and from QWidget::mapToGlobal(pos()).
See also globalX() and globalY().
Upstream PySide2 reference signatures (binding differences may apply):
globalPos(self) -> PySide2.QtCore.QPoint
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#globalPos
globalX
globalX() -> int
X.globalX() -> int
Supplemental documentation: Qt 5 reference:
int QMouseEvent::globalX() const
Returns the global x position of the mouse cursor at the time of the event.
See also globalY() and globalPos().
Upstream PySide2 reference signatures (binding differences may apply):
globalX(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#globalX
globalY
globalY() -> int
X.globalY() -> int
Supplemental documentation: Qt 5 reference:
int QMouseEvent::globalY() const
Returns the global y position of the mouse cursor at the time of the event.
See also globalX() and globalPos().
Upstream PySide2 reference signatures (binding differences may apply):
globalY(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#globalY
localPos
localPos() -> Any
X.localPos() -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
const QPointF \&QMouseEvent::localPos() const
Returns the position of the mouse cursor as a QPointF, relative to the widget or item that received the event.
If you move the widget as a result of the mouse event, use the screen position returned by screenPos() to avoid a shaking motion.
This function was introduced in Qt 5.0.
See also x(), y(), windowPos(), and screenPos().
Upstream PySide2 reference signatures (binding differences may apply):
localPos(self) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#localPos
pos
pos() -> Any
X.pos() -> PythonQt.QtCore.QPoint
Supplemental documentation: Qt 5 reference:
QPoint QMouseEvent::pos() const
Returns the position of the mouse cursor, relative to the widget that received the event.
If you move the widget as a result of the mouse event, use the global position returned by globalPos() to avoid a shaking motion.
See also x(), y(), and globalPos().
Upstream PySide2 reference signatures (binding differences may apply):
pos(self) -> PySide2.QtCore.QPoint
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#pos
screenPos
screenPos() -> Any
X.screenPos() -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
const QPointF \&QMouseEvent::screenPos() const
Returns the position of the mouse cursor as a QPointF, relative to the screen that received the event.
This function was introduced in Qt 5.0.
See also x(), y(), pos(), localPos(), and windowPos().
Upstream PySide2 reference signatures (binding differences may apply):
screenPos(self) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#screenPos
source
source() -> Any
X.source()
Supplemental documentation: Qt 5 reference:
Qt::MouseEventSource QMouseEvent::source() const
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.
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().
Upstream PySide2 reference signatures (binding differences may apply):
source(self) -> PySide2.QtCore.Qt.MouseEventSource
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#source
windowPos
windowPos() -> Any
X.windowPos() -> PythonQt.QtCore.QPointF
Supplemental documentation: Qt 5 reference:
const QPointF \&QMouseEvent::windowPos() const
Returns the position of the mouse cursor as a QPointF, relative to the window that received the event.
If you move the widget as a result of the mouse event, use the global position returned by globalPos() to avoid a shaking motion.
This function was introduced in Qt 5.0.
See also x(), y(), pos(), localPos(), and screenPos().
Upstream PySide2 reference signatures (binding differences may apply):
windowPos(self) -> PySide2.QtCore.QPointF
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#windowPos
x
x() -> int
X.x() -> int
Supplemental documentation: Qt 5 reference:
int QMouseEvent::x() const
Returns the x position of the mouse cursor, relative to the widget that received the event.
Upstream PySide2 reference signatures (binding differences may apply):
x(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#x
y
y() -> int
X.y() -> int
Supplemental documentation: Qt 5 reference:
int QMouseEvent::y() const
Returns the y position of the mouse cursor, relative to the widget that received the event.
Upstream PySide2 reference signatures (binding differences may apply):
y(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qmouseevent.html#y