The QScrollPrepareEvent class is sent in preparation of scrolling. More...
Header: | #include <QScrollPrepareEvent> |
CMake: | find_package(Qt6 COMPONENTS Gui REQUIRED) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
Inherits: | QEvent |
QScrollPrepareEvent(const QPointF &startPos) | |
virtual | ~QScrollPrepareEvent() |
QPointF | contentPos() const |
QRectF | contentPosRange() const |
void | setContentPos(const QPointF &pos) |
void | setContentPosRange(const QRectF &rect) |
void | setViewportSize(const QSizeF &size) |
QPointF | startPos() const |
QSizeF | viewportSize() const |
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 and QScroller.
Creates new QScrollPrepareEvent The startPos is the position of a touch or mouse event that started the scrolling.
[virtual]
QScrollPrepareEvent::~QScrollPrepareEvent()
Destroys QScrollEvent.
Returns the current position of the content as set by setContentPos.
See also setContentPos().
Returns the range of coordinates for the content as set by setContentPosRange().
See also setContentPosRange().
Sets the current content position to pos.
See also contentPos().
Sets the range of content coordinates to rect.
See also contentPosRange().
Sets the size of the area that is to be scrolled to size.
See also viewportSize().
Returns the position of the touch or mouse event that started the scrolling.
Returns size of the area that is to be scrolled as set by setViewportSize
See also setViewportSize().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qscrollprepareevent.html