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

QPointerEvent Class

A base class for pointer events.

This class was introduced in Qt 6.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QPointerEvent Class

  • Header: QPointerEvent

  • Since: Qt 6.0

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Gui)

    target_link_libraries(mytarget PRIVATE Qt6::Gui)

  • qmake: QT += gui

  • Inherits: QInputEvent

  • Inherited By: QSinglePointEvent and QTouchEvent

Detailed Description

 

Member Function Documentation

 

bool QPointerEvent::addPassiveGrabber(const QEventPoint &point, QObject *grabber)

Informs the delivery logic that the given grabber is to receive all future update events and the release event containing the given point, regardless where else those events may be delivered.

It's only for use by Qt Quick Input Handlers.

Returns false if grabber was already added, true otherwise.

bool QPointerEvent::allPointsAccepted() const

Returns true if isPointAccepted() is true for every point in points(); otherwise false.

bool QPointerEvent::allPointsGrabbed() const

Returns true if every point in points() has either an exclusiveGrabber() or one or more passiveGrabbers().

void QPointerEvent::clearPassiveGrabbers(const QEventPoint &point)

Removes all passive grabbers from the given point.

It's only for use by Qt Quick Input Handlers.

See Also

QObject *QPointerEvent::exclusiveGrabber(const QEventPoint &point) const

Returns the object which has been set to receive all future update events and the release event containing the given point.

It's mainly for use in Qt Quick at this time.

See Also

See also setExclusiveGrabber()

QList<QPointer<QObject>> QPointerEvent::passiveGrabbers(const QEventPoint &point) const

Returns the list of objects that have been requested to receive all future update events and the release event containing the given point.

It's only for use by Qt Quick Input Handlers.

See Also

QEventPoint &QPointerEvent::point(qsizetype i)

Returns a QEventPoint reference for the point at index i.

QEventPoint *QPointerEvent::pointById(int id)

Returns the point whose id matches the given id, or nullptr if no such point is found.

qsizetype QPointerEvent::pointCount() const

Returns the number of points in this pointer event.

QPointingDevice::PointerType QPointerEvent::pointerType() const

Returns the type of point that generated the event.

const QPointingDevice *QPointerEvent::pointingDevice() const

Returns the source device from which this event originates.

This is the same as QInputEvent::device() but typecast for convenience.

const QList<QEventPoint> &QPointerEvent::points() const

Returns a list of points in this pointer event.

bool QPointerEvent::removePassiveGrabber(const QEventPoint &point, QObject *grabber)

Removes the passive grabber from the given point if it was previously added. Returns true if it had been a passive grabber before, false if not.

It's only for use by Qt Quick Input Handlers.

See Also

[override virtual] void QPointerEvent::setAccepted(bool accepted)

Reimplements an access function for property: QEvent::accepted.

void QPointerEvent::setExclusiveGrabber(const QEventPoint &point, QObject *exclusiveGrabber)

Informs the delivery logic that the given exclusiveGrabber is to receive all future update events and the release event containing the given point, and that delivery to other items can be skipped.

It's mainly for use in Qt Quick at this time.

See Also

See also exclusiveGrabber()

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