QGraphicsSceneWheelEvent 类提供在图形视图框架中的滚轮事件。 更多...
头: | #include <QGraphicsSceneWheelEvent> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
继承: | QGraphicsSceneEvent |
virtual | ~QGraphicsSceneWheelEvent () |
Qt::MouseButtons | buttons () const |
int | delta () const |
(从 6.2 起)
bool
|
isInverted () const |
Qt::KeyboardModifiers | modifiers () const |
Qt::Orientation | orientation () const |
(从 6.2 起)
Qt::ScrollPhase
|
phase () const |
(从 6.2 起)
QPoint
|
pixelDelta () const |
QPointF | pos () const |
QPointF | scenePos () const |
QPoint | screenPos () const |
QWheelEvent 接收通过 QGraphicsView are translated into QGraphicsSceneWheelEvents; it translates the QWheelEvent::globalPos() into item, scene, and screen coordinates ( pos (), scenePos (),和 screenPos ()).
另请参阅 QGraphicsSceneMouseEvent , QGraphicsSceneContextMenuEvent , QGraphicsSceneHoverEvent ,和 QWheelEvent .
[virtual noexcept]
QGraphicsSceneWheelEvent::
~QGraphicsSceneWheelEvent
()
Returns the mouse buttons that were pressed when the wheel event occurred.
另请参阅 modifiers ().
Returns the distance that the wheel is rotated, in eighths (1/8s) of a degree. A positive value indicates that the wheel was rotated forwards away from the user; a negative value indicates that the wheel was rotated backwards toward the user.
Most mouse types work in steps of 15 degrees, in which case the delta value is a multiple of 120 (== 15 * 8).
[since 6.2]
bool
QGraphicsSceneWheelEvent::
isInverted
() const
返回随事件交付的增量值是否反转。
该函数在 Qt 6.2 引入。
Returns the keyboard modifiers that were active when the wheel event occurred.
另请参阅 buttons ().
返回滚轮取向。
[since 6.2]
Qt::ScrollPhase
QGraphicsSceneWheelEvent::
phase
() const
返回此滚轮事件的卷动阶段。
该函数在 Qt 6.2 引入。
另请参阅 QWheelEvent::phase .
[since 6.2]
QPoint
QGraphicsSceneWheelEvent::
pixelDelta
() const
返回以屏幕像素为单位的卷动距离。此值由支持基于高分辨率像素的增量值的平台 (譬如 macOS) 提供。应该将值直接用于卷动屏幕内容。
该函数在 Qt 6.2 引入。
另请参阅 QWheelEvent::pixelDelta .
Returns the position of the cursor in item coordinates when the wheel event occurred.
另请参阅 scenePos () 和 screenPos ().
Returns the position of the cursor in scene coordinates when the wheel event occurred.
Returns the position of the cursor in screen coordinates when the wheel event occurred.