QScrollEvent Class

The QScrollEvent class is sent when scrolling. More...

Header: #include <QScrollEvent>
qmake: QT += gui
Since: Qt 4.8
Inherits: QEvent

This class was introduced in Qt 4.8.

Public Types

enum ScrollState { ScrollStarted, ScrollUpdated, ScrollFinished }

Detailed Description

The scroll event is sent to indicate that the receiver should be scrolled. Usually the receiver should be something visual like QWidget or QGraphicsObject.

Some care should be taken that no conflicting QScrollEvents are sent from two sources. Using QScroller::scrollTo is save however.

See also QScrollPrepareEvent and QScroller.

Member Type Documentation

enum QScrollEvent::ScrollState

This enum describes the states a scroll event can have.

ConstantValueDescription
QScrollEvent::ScrollStarted0Set for the first scroll event of a scroll activity.
QScrollEvent::ScrollUpdated1Set for all but the first and the last scroll event of a scroll activity.
QScrollEvent::ScrollFinished2Set for the last scroll event of a scroll activity.

See also QScrollEvent::scrollState().