QScrollPrepareEvent¶
The
QScrollPrepareEvent
class is sent in preparation of scrolling. More…
Synopsis¶
Functions¶
def
contentPos
()def
contentPosRange
()def
setContentPos
(pos)def
setContentPosRange
(rect)def
setViewportSize
(size)def
startPos
()def
viewportSize
()
Detailed Description¶
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
QScrollEvent
will be sent after an acceeptedQScrollPrepareEvent
, e.g. in a case where the maximum content position is (0,0).See also
QScrollEvent
QScroller
- class PySide2.QtGui.QScrollPrepareEvent(startPos)¶
- param startPos:
Creates new
QScrollPrepareEvent
ThestartPos
is the position of a touch or mouse event that started the scrolling.
- PySide2.QtGui.QScrollPrepareEvent.contentPos()¶
- Return type:
Returns the current position of the content as set by
setContentPos
.See also
- PySide2.QtGui.QScrollPrepareEvent.contentPosRange()¶
- Return type:
Returns the range of coordinates for the content as set by
setContentPosRange()
.See also
- PySide2.QtGui.QScrollPrepareEvent.setContentPos(pos)¶
- Parameters:
pos –
PySide2.QtCore.QPointF
Sets the current content position to
pos
.See also
- PySide2.QtGui.QScrollPrepareEvent.setContentPosRange(rect)¶
- Parameters:
rect –
PySide2.QtCore.QRectF
Sets the range of content coordinates to
rect
.See also
- PySide2.QtGui.QScrollPrepareEvent.setViewportSize(size)¶
- Parameters:
size –
PySide2.QtCore.QSizeF
Sets the size of the area that is to be scrolled to
size
.See also
- PySide2.QtGui.QScrollPrepareEvent.startPos()¶
- Return type:
Returns the position of the touch or mouse event that started the scrolling.
- PySide2.QtGui.QScrollPrepareEvent.viewportSize()¶
- Return type:
Returns size of the area that is to be scrolled as set by
setViewportSize
See also
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.