IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QScrollPrepareEvent Class

The QScrollPrepareEvent class is sent in preparation of scrolling.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QScrollPrepareEvent Class▲

  • Header: QScrollPrepareEvent

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Gui)

    target_link_libraries(mytarget PRIVATE Qt6::Gui)

  • qmake: QT += gui

  • Inherits: QEvent

  • Group: QScrollPrepareEvent is part of events

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▲

Member Function Documentation▲

 

[explicit] QScrollPrepareEvent::QScrollPrepareEvent(const QPointF &startPos)▲

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

QPointF QScrollPrepareEvent::contentPos() const▲

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

See Also▲

See also setContentPos()

QRectF QScrollPrepareEvent::contentPosRange() const▲

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

See Also▲

See also setContentPosRange()

void QScrollPrepareEvent::setContentPos(const QPointF &pos)▲

Sets the current content position to pos.

See Also▲

See also contentPos()

void QScrollPrepareEvent::setContentPosRange(const QRectF &rect)▲

Sets the range of content coordinates to rect.

See Also▲

See also contentPosRange()

void QScrollPrepareEvent::setViewportSize(const QSizeF &size)▲

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

See Also▲

See also viewportSize()

QPointF QScrollPrepareEvent::startPos() const▲

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

QSizeF QScrollPrepareEvent::viewportSize() const▲

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

See Also▲

See also setViewportSize()

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+