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
()
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).
See also
QScrollEvent
QScroller
- class PySide6.QtGui.QScrollPrepareEvent(startPos)#
PySide6.QtGui.QScrollPrepareEvent(arg__1)
- Parameters:
arg__1 –
PySide6.QtGui.QScrollPrepareEvent
startPos –
PySide6.QtCore.QPointF
Creates new QScrollPrepareEvent
The startPos
is the position of a touch or mouse event that started the scrolling.
Creates new QScrollPrepareEvent
The startPos
is the position of a touch or mouse event that started the scrolling.
- PySide6.QtGui.QScrollPrepareEvent.contentPos()#
- Return type:
Returns the current position of the content as set by setContentPos
.
See also
- PySide6.QtGui.QScrollPrepareEvent.contentPosRange()#
- Return type:
Returns the range of coordinates for the content as set by setContentPosRange()
.
See also
- PySide6.QtGui.QScrollPrepareEvent.setContentPos(pos)#
- Parameters:
pos –
PySide6.QtCore.QPointF
Sets the current content position to pos
.
See also
- PySide6.QtGui.QScrollPrepareEvent.setContentPosRange(rect)#
- Parameters:
rect –
PySide6.QtCore.QRectF
Sets the range of content coordinates to rect
.
See also
- PySide6.QtGui.QScrollPrepareEvent.setViewportSize(size)#
- Parameters:
size –
PySide6.QtCore.QSizeF
Sets the size of the area that is to be scrolled to size
.
See also
- PySide6.QtGui.QScrollPrepareEvent.startPos()#
- Return type:
Returns the position of the touch or mouse event that started the scrolling.
- PySide6.QtGui.QScrollPrepareEvent.viewportSize()#
- Return type:
Returns size of the area that is to be scrolled as set by setViewportSize
See also