内容表

上一话题

QScrollEvent

下一话题

QSessionManager

QScrollPrepareEvent

QScrollPrepareEvent class is sent in preparation of scrolling. 更多 …

Inheritance diagram of PySide2.QtGui.QScrollPrepareEvent

详细描述

The scroll prepare event is sent before scrolling (usually by QScroller ) is started. The object receiving this event should set viewportSize , maxContentPos and contentPos . It also should accept this event to indicate that scrolling should be started.

It is not guaranteed that a QScrollEvent will be sent after an acceepted QScrollPrepareEvent , e.g. in a case where the maximum content position is (0,0).

另请参阅

QScrollEvent QScroller

class QScrollPrepareEvent ( startPos )
param startPos

QPointF

Creates new QScrollPrepareEvent startPos is the position of a touch or mouse event that started the scrolling.

PySide2.QtGui.QScrollPrepareEvent. contentPos ( )
返回类型

QPointF

Returns the current position of the content as set by setContentPos .

另请参阅

setContentPos()

PySide2.QtGui.QScrollPrepareEvent. contentPosRange ( )
返回类型

QRectF

Returns the range of coordinates for the content as set by setContentPosRange() .

PySide2.QtGui.QScrollPrepareEvent. setContentPos ( pos )
参数

pos – QPointF

Sets the current content position to pos .

另请参阅

contentPos()

PySide2.QtGui.QScrollPrepareEvent. setContentPosRange ( rect )
参数

rect – QRectF

Sets the range of content coordinates to rect .

另请参阅

contentPosRange()

PySide2.QtGui.QScrollPrepareEvent. setViewportSize ( size )
参数

size – QSizeF

Sets the size of the area that is to be scrolled to size .

另请参阅

viewportSize()

PySide2.QtGui.QScrollPrepareEvent. startPos ( )
返回类型

QPointF

Returns the position of the touch or mouse event that started the scrolling.

PySide2.QtGui.QScrollPrepareEvent. viewportSize ( )
返回类型

QSizeF

Returns size of the area that is to be scrolled as set by setViewportSize

另请参阅

setViewportSize()