Pointer

API ReferenceRendererItemPointer

Rectangle {
    width: 100
    height: 100
    color: 'green'
    if (this.pointer.hover) {
        color: 'red'
    }
}

Source

Enables mouse and touch handling.

Source


enabled

Type
Boolean
Default
true

onEnabledChange()

Parameters
  • oldValue — Boolean
Type
Signal

Source


draggable

Type
Boolean
Default
false
Not Implemented

onDraggableChange()

Parameters
  • oldValue — Boolean
Type
Signal
Not Implemented

Source


dragActive

Type
Boolean
Default
false
Not Implemented

onDragActiveChange()

Parameters
  • oldValue — Boolean
Type
Signal
Not Implemented

Source


onClick()

Parameters
  • event — Item.Pointer.Event
Type
Signal

onPress()

Parameters
  • event — Item.Pointer.Event
Type
Signal

onRelease()

Parameters
  • event — Item.Pointer.Event
Type
Signal

onEnter()

Parameters
  • event — Item.Pointer.Event
Type
Signal

onExit()

Parameters
  • event — Item.Pointer.Event
Type
Signal

onWheel()

Parameters
  • event — Item.Pointer.Event
Type
Signal

onMove()

Parameters
  • event — Item.Pointer.Event
Type
Signal

Source


pressed

Type
Boolean
Default
false

Whether the pointer is currently pressed.


onPressedChange()

Parameters
  • oldValue — Boolean
Type
Signal

Source


hover

Type
Boolean
Default
false

Whether the pointer is currently under the item.


onHoverChange()

Parameters
  • oldValue — Boolean
Type
Signal

Source


**Class** Pointer.Event

Extends
Device.PointerEvent

Events order:

  1. Press
  2. Enter
  3. Move
  4. Move (not captured ensured items)
  5. Exit
  6. Release
  7. Click
  8. Exit (entered items on touch devices)
  9. Release (not captured ensured items)

Stopped 'Enter' event will emit 'Move' event on this item.

Stopped 'Exit' event will emit 'Release' event on this item.

Source


stopPropagation

Type
Boolean
Default
false

Enable this property to stop further event propagation.

This property is reset on each pointer press.

Source


checkSiblings

Type
Boolean
Default
false

By default first deepest captured item will propagate this event only by his parents.

Change this value to test previous siblings as well.

This property is reset on each pointer press.

Source


ensureRelease

Type
Boolean
Default
true

Define whether pressed item should get 'onRelease' signal even if the pointer has been released outside of this item.

Can be changed only in the 'onPress' signal.

Source


ensureMove

Type
Boolean
Default
true

Define whether the pressed item should get 'onMove' signals even if the pointer is outside of this item.

Can be changed only in the 'onPress' signal.

Source


preventClick

Type
Boolean
Default
false

Set it to true to block emitting click signals.

This property is reset on each pointer press.

It's internally used by Scrollable element to block clicks after view has been scrolled.

Source


Pointer.event

Static property of
Pointer
Type
Item.Pointer.Event

Source

results matching ""

    No results matching ""