QWheelEvent露
- PyQt5.QtGui.QWheelEvent
Inherits from QInputEvent.
Description露
The QWheelEvent class contains parameters that describe a wheel event.
Wheel events are sent to the widget under the mouse cursor, but if that widget does not handle the event they are sent to the focus widget. Wheel events are generated for both mouse wheels and trackpad scroll gestures. There are two ways to read the wheel event delta: angleDelta() returns the delta in wheel degrees. This value is always provided. pixelDelta() returns the delta in screen pixels and is available on platforms that have high-resolution trackpads, such as macOS. If that is the case, source() will return Qt::MouseEventSynthesizedBySystem.
The functions pos() and globalPos() return the mouse cursor鈥檚 location at the time of the event.
A wheel event contains a special accept flag that indicates whether the receiver wants the event. You should call ignore() if you do not handle the wheel event; this ensures that it will be sent to the parent widget.
The setEnabled() function can be used to enable or disable mouse and keyboard events for a widget.
The event handler QWidget::wheelEvent() receives wheel events.
See also
Methods露
- __init__(QWheelEvent)
TODO
- __init__(Union[QPointF, QPoint], Union[QPointF, QPoint], QPoint, QPoint, int, Orientation, Union[MouseButtons, MouseButton], Union[KeyboardModifiers, KeyboardModifier])
TODO
- __init__(Union[QPointF, QPoint], Union[QPointF, QPoint], QPoint, QPoint, int, Orientation, Union[MouseButtons, MouseButton], Union[KeyboardModifiers, KeyboardModifier], ScrollPhase)
TODO
- __init__(Union[QPointF, QPoint], Union[QPointF, QPoint], QPoint, QPoint, Union[MouseButtons, MouseButton], Union[KeyboardModifiers, KeyboardModifier], ScrollPhase, bool, source: MouseEventSource = MouseEventNotSynthesized)
TODO
- __init__(Union[QPointF, QPoint], Union[QPointF, QPoint], QPoint, QPoint, int, Orientation, Union[MouseButtons, MouseButton], Union[KeyboardModifiers, KeyboardModifier], ScrollPhase, MouseEventSource)
TODO
- __init__(Union[QPointF, QPoint], Union[QPointF, QPoint], QPoint, QPoint, int, Orientation, Union[MouseButtons, MouseButton], Union[KeyboardModifiers, KeyboardModifier], ScrollPhase, MouseEventSource, bool)
TODO
- angleDelta() → QPoint
TODO
- buttons() → MouseButtons
TODO
- globalPos() → QPoint
TODO
- globalPosF() → QPointF
TODO
- globalPosition() → QPointF
TODO
- globalX() → int
TODO
- globalY() → int
TODO
- inverted() → bool
TODO
- phase() → ScrollPhase
TODO
- pixelDelta() → QPoint
TODO
- pos() → QPoint
TODO
- posF() → QPointF
TODO
- position() → QPointF
TODO
- source() → MouseEventSource
TODO
- x() → int
TODO
- y() → int
TODO