

Those can also accept the event to prevent further delivery and get an implicit grab at the same time or explicitly grab the single QEventPoint that the QMouseEvent carries. Likewise, a QQuickItem subclass can call setAcceptedMouseButtons() to register to receive mouse button events, setAcceptHoverEvents() to receive hover events (mouse movements while no button is pressed), and override the virtual functions mousePressEvent(), mouseMoveEvent(), and mouseReleaseEvent(). Use QPointerEvent::setExclusiveGrabber() to grab only certain touchpoints, and allow the event to be delivered further. Accept the entire event to stop delivery to items underneath, and to exclusively grab for all the event's touch points. This is the preferred declarative way to handle events.Īn alternative way to handle touch events is to subclass QQuickItem, call setAcceptTouchEvents() in the constructor, and override touchEvent(). Tile source: "tile.png"Īll Item-based visual types can use Input Handlers to handle incoming input events (subclasses of QInputEvent), such as mouse, touch and key events. X: 190 width: 100 height: 100 fillMode: Image. X: 80 width: 100 height: 100 source: "tile.png" The Item type can be useful for grouping several items under a single root visual item. Although an Item object has no visual appearance, it defines all the attributes that are common across visual items, such as x and y position, width and height, anchoring and key handling support. The Item type is the base type for all visual items in Qt Quick.Īll visual items in Qt Quick inherit from Item. rect mapToItem(Item item, real x, real y, real width, real height).point mapToItem(Item item, real x, real y).rect mapFromItem(Item item, real x, real y, real width, real height).point mapFromItem(Item item, real x, real y).


forceActiveFocus(Qt::FocusReason reason).List of all members, including inherited members.AnimatedSprite, BorderImage, Canvas, Column, ColumnLayout, DropArea, Flickable, Flipable, Flow, FocusScope, Grid, GridLayout, Image, Loader, MouseArea, MultiEffect, MultiPointTouchArea, ParticlePainter, PathView, PinchArea, Rectangle, Repeater, Row, RowLayout, ShaderEffect, ShaderEffectSource, Shape, SpriteSequence, StackLayout, Text, TextEdit, and TextInput
