class QScrollPrepareEvent#

The QScrollPrepareEvent class is sent in preparation of scrolling. More

Inheritance diagram of PySide6.QtGui.QScrollPrepareEvent

Synopsis#

Methods#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

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 accepted QScrollPrepareEvent , e.g. in a case where the maximum content position is (0, 0).

__init__(startPos)#
Parameters:

startPosQPointF

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

__init__(arg__1)
Parameters:

arg__1QScrollPrepareEvent

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

contentPos()#
Return type:

QPointF

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

See also

setContentPos()

contentPosRange()#
Return type:

QRectF

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

setContentPos(pos)#
Parameters:

posQPointF

Sets the current content position to pos.

See also

contentPos()

setContentPosRange(rect)#
Parameters:

rectQRectF

Sets the range of content coordinates to rect.

setViewportSize(size)#
Parameters:

sizeQSizeF

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

See also

viewportSize()

startPos()#
Return type:

QPointF

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

viewportSize()#
Return type:

QSizeF

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