QScrollEventclass is sent when scrolling. 更多 …
def
contentPos
()
def
overshootDistance
()
def
scrollState
()
The scroll event is sent to indicate that the receiver should be scrolled. Usually the receiver should be something visual like
QWidgetorQGraphicsObject.Some care should be taken that no conflicting QScrollEvents are sent from two sources. Using
scrollTois save however.另请参阅
QScrollPrepareEventQScroller
QScrollEvent
(
contentPos
,
overshoot
,
scrollState
)
¶
- param overshoot
QPointF- param scrollState
ScrollState- param contentPos
QPointF
创建新
QScrollEvent
contentPos
is the new content position,
overshootDistance
is the new overshoot distance while
scrollState
indicates if this scroll event is the first one, the last one or some event in between.
PySide2.QtGui.QScrollEvent.
ScrollState
¶
此枚举描述卷动事件可拥有的状态。
|
常量 |
描述 |
|---|---|
|
QScrollEvent.ScrollStarted |
Set for the first scroll event of a scroll activity. |
|
QScrollEvent.ScrollUpdated |
Set for all but the first and the last scroll event of a scroll activity. |
|
QScrollEvent.ScrollFinished |
Set for the last scroll event of a scroll activity. |
另请参阅
PySide2.QtGui.QScrollEvent.
contentPos
(
)
¶
QPointF
返回新卷动位置。
PySide2.QtGui.QScrollEvent.
overshootDistance
(
)
¶
QPointF
返回新过冲距离。见
QScroller
for an explanation of the term overshoot.
另请参阅
QScroller
PySide2.QtGui.QScrollEvent.
scrollState
(
)
¶
Returns the current scroll state as a combination of ScrollStateFlag values.
ScrollStarted
(或
ScrollFinished
) will be set, if this scroll event is the first (or last) event in a scrolling activity. Please note that both values can be set at the same time, if the activity consists of a single
QScrollEvent
. All other scroll events in between will have their state set to
ScrollUpdated
.
A widget could for example revert selections when scrolling is started and stopped.