Gamepad QML Type

A gamepad device connected to a system. More...

Import Statement: import QtGamepad 1.15
Instantiates: QGamepad

Properties

Detailed Description

Gamepad QML type is used to access the current state of gamepad hardware connected to a system.

Property Documentation

[read-only] axisLeftX : double

The value of the left thumbstick's X axis. The axis values range from -1.0 to 1.0.


[read-only] axisLeftY : double

The value of the left thumbstick's Y axis. The axis values range from -1.0 to 1.0.


[read-only] axisRightX : double

This value of the right thumbstick's X axis. The axis values range from -1.0 to 1.0.


[read-only] axisRightY : double

This value of the right thumbstick's Y axis. The axis values range from -1.0 to 1.0.


[read-only] buttonL1 : bool

The state of the left shoulder button. The value is true when pressed, and false when not pressed.


[read-only] buttonL2 : double

The value of the left trigger button. This trigger value ranges from 0.0 when not pressed to 1.0 when pressed completely.


[read-only] buttonL3 : bool

The state of the left stick button. The value is true when pressed, and false when not pressed. This button is usually triggered by pressing the left joystick itself.


[read-only] buttonR1 : bool

The state of the right shoulder button. The value is true when pressed, and false when not pressed.


[read-only] buttonR2 : double

The value of the right trigger button. This trigger value ranges from 0.0 when not pressed to 1.0 when pressed completely.


[read-only] buttonR3 : bool

The state of the right stick button. The value is true when pressed, and false when not pressed. This button is usually triggered by pressing the right joystick itself.


[read-only] buttonA : bool

The state of the A button. The value is true when pressed, and false when not pressed.


[read-only] buttonB : bool

The state of the B button. The value is true when pressed, and false when not pressed.


[read-only] buttonDown : bool

The state of the direction pad down button. The value is true when pressed, and false when not pressed.


[read-only] buttonLeft : bool

The state of the direction pad left button. The value is true when pressed, and false when not pressed.


[read-only] buttonRight : bool

The state of the direction pad right button. The value is true when pressed, and false when not pressed.


[read-only] buttonSelect : bool

The state of the Select button. The value is true when pressed, and false when not pressed. This button can sometimes be labeled as the Back button on some gamepads.


[read-only] buttonStart : bool

The state of the Start button. The value is true when pressed, and false when not pressed. This button can sometimes be labeled as the Forward button on some gamepads.


[read-only] buttonUp : bool

The state of the direction pad up button. The value is true when pressed, and false when not pressed.


[read-only] buttonX : bool

The state of the X button. The value is true when pressed, and false when not pressed.


[read-only] buttonY : bool

The state of the Y button. The value is true when pressed, and false when not pressed.


[read-only] connected : bool

The connectivity state of the gamepad device. If a gamepad is connected, this property will be true, otherwise false.


deviceId : int

This property holds the deviceId of the gamepad device. Multiple gamepad devices can be connected at any given time, so setting this property defines which gamepad to use.

See also GamepadManager.connectedGamepads.


[read-only] name : string

The reported name of the gamepad if one is available.