QScrollPrepareEvent露

The QScrollPrepareEvent class is sent in preparation of scrolling. More鈥�

Inheritance diagram of PySide2.QtGui.QScrollPrepareEvent

Synopsis露

Functions露

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

See also

QScrollEvent QScroller

class PySide2.QtGui.QScrollPrepareEvent(startPos)露
param startPos:

PySide2.QtCore.QPointF

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

PySide2.QtGui.QScrollPrepareEvent.contentPos()露
Return type:

PySide2.QtCore.QPointF

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

See also

setContentPos()

PySide2.QtGui.QScrollPrepareEvent.contentPosRange()露
Return type:

PySide2.QtCore.QRectF

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

PySide2.QtGui.QScrollPrepareEvent.setContentPos(pos)露
Parameters:

pos 鈥� PySide2.QtCore.QPointF

Sets the current content position to pos .

See also

contentPos()

PySide2.QtGui.QScrollPrepareEvent.setContentPosRange(rect)露
Parameters:

rect 鈥� PySide2.QtCore.QRectF

Sets the range of content coordinates to rect .

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

viewportSize()

PySide2.QtGui.QScrollPrepareEvent.startPos()露
Return type:

PySide2.QtCore.QPointF

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

PySide2.QtGui.QScrollPrepareEvent.viewportSize()露
Return type:

PySide2.QtCore.QSizeF

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