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 |
| bool | isInverted () const |
| Qt::KeyboardModifiers | modifiers () const |
| Qt::Orientation | orientation () const |
| Qt::ScrollPhase | phase () const |
| 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 .
[虛擬]
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
返迴隨事件交付的增量值是否反轉。
This function was introduced in Qt 6.2.
Returns the keyboard modifiers that were active when the wheel event occurred.
另請參閱 buttons ().
返迴滾輪取嚮。
[since 6.2]
Qt::ScrollPhase
QGraphicsSceneWheelEvent::
phase
() const
返迴此滾輪事件的捲動階段。
This function was introduced in Qt 6.2.
另請參閱 QWheelEvent::phase .
[since 6.2]
QPoint
QGraphicsSceneWheelEvent::
pixelDelta
() const
返迴以屏幕像素為單位的捲動距離。此值由支持基於高分辨率像素的增量值的平颱 (譬如 macOS) 提供。應該將值直接用於捲動屏幕內容。
This function was introduced in 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.