QScrollPrepareEvent

PyQt5.QtGui.QScrollPrepareEvent

Inherits from QEvent.

Description

The QScrollPrepareEvent class is sent in preparation of scrolling.

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).

See also

QScrollEvent.

Methods

__init__(Union[QPointF, QPoint])

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


__init__(QScrollPrepareEvent)

TODO


contentPos() → QPointF

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

See also

setContentPos().


contentPosRange() → QRectF

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


setContentPos(Union[QPointF, QPoint])

Sets the current content position to pos.

See also

contentPos().


setContentPosRange(QRectF)

Sets the range of content coordinates to rect.

See also

contentPosRange().


setViewportSize(QSizeF)

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

See also

viewportSize().


startPos() → QPointF

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


viewportSize() → QSizeF

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

See also

setViewportSize().