QScrollPrepareEventclass is sent in preparation of scrolling. 更多 …
def
contentPos
()
def
contentPosRange
()
def
setContentPos
(pos)
def
setContentPosRange
(rect)
def
setViewportSize
(size)
def
startPos
()
def
viewportSize
()
The scroll prepare event is sent before scrolling (usually by
QScroller) is started. The object receiving this event should setviewportSize, maxContentPos andcontentPos. It also should accept this event to indicate that scrolling should be started.It is not guaranteed that a
QScrollEventwill be sent after an acceeptedQScrollPrepareEvent, e.g. in a case where the maximum content position is (0,0).另请参阅
QScrollEventQScroller
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
.
另请参阅
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
.
另请参阅
PySide2.QtGui.QScrollPrepareEvent.
setContentPosRange
(
rect
)
¶
rect
–
QRectF
Sets the range of content coordinates to
rect
.
另请参阅
PySide2.QtGui.QScrollPrepareEvent.
setViewportSize
(
size
)
¶
size
–
QSizeF
Sets the size of the area that is to be scrolled to
size
.
另请参阅
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
另请参阅