QPointingDevice

The QPointingDevice class describes a device from which mouse, touch or tablet events originate. More

Inheritance diagram of PySide6.QtGui.QPointingDevice

New in version 6.0.

Synopsis

Functions

Signals

Static functions

Detailed Description

Each QPointerEvent contains a QPointingDevice pointer to allow accessing device-specific properties like type and capabilities. It is the responsibility of the platform or generic plug-ins to register the available pointing devices via QWindowSystemInterface before generating any pointer events. Applications do not need to instantiate this class, they should just access the global instances pointed to by device() .

class PySide6.QtGui.QPointingDevice([parent=None])

PySide6.QtGui.QPointingDevice(name, systemId, devType, pType, caps, maxPoints, buttonCount[, seatName=””[, uniqueId=QPointingDeviceUniqueId()[, parent=None]]])

Parameters

Creates a new invalid pointing device instance as a child of parent.

Creates a new pointing device instance with the given name, deviceType, pointerType, capabilities, maxPoints, buttonCount, seatName, uniqueId and parent.

PySide6.QtGui.QPointingDevice.PointerType

This enum represents what is interacting with the pointing device.

There is some redundancy between this property and DeviceType . For example, if a touchscreen is used, then the DeviceType is TouchScreen and PointerType is Finger (always). But on a graphics tablet, it’s often possible for both ends of the stylus to be used, and programs need to distinguish them. Therefore the concept is extended so that every QPointerEvent has a , and it can simplify some event handling code to ignore the DeviceType and react differently depending on the alone.

Valid values are:

Constant

Description

QPointingDevice.PointerType.Unknown

The pointer type is unknown.

QPointingDevice.PointerType.Generic

A mouse or something acting like a mouse (the core pointer on X11).

QPointingDevice.PointerType.Finger

The user’s finger.

QPointingDevice.PointerType.Pen

The drawing end of a stylus.

QPointingDevice.PointerType.Eraser

The other end of the stylus (if it has a virtual eraser on the other end).

QPointingDevice.PointerType.Cursor

A transparent circle with cross-hairs as found on a Puck device.

QPointingDevice.PointerType.AllPointerTypes

Any of the above (used as a default filter value).

PySide6.QtGui.QPointingDevice.GrabTransition
PySide6.QtGui.QPointingDevice.buttonCount()
Return type

int

PySide6.QtGui.QPointingDevice.grabChanged(grabber, transition, event, point)
Parameters
PySide6.QtGui.QPointingDevice.maximumPoints()
Return type

int

PySide6.QtGui.QPointingDevice.__eq__(other)
Parameters

otherPySide6.QtGui.QPointingDevice

Return type

bool

PySide6.QtGui.QPointingDevice.pointerType()
Return type

PointerType

static PySide6.QtGui.QPointingDevice.primaryPointingDevice([seatName=""])
Parameters

seatName – str

Return type

PySide6.QtGui.QPointingDevice

Returns the primary pointing device (the core pointer, traditionally assumed to be a mouse) on the given seat seatName.

If multiple pointing devices are registered, this function prefers a mouse or touchpad that matches the given seatName and that does not have another device as its parent. Usually only one master or core device does not have a parent device. But if such a device is not found, this function creates a new virtual “core pointer” mouse. Thus Qt continues to work on platforms that are not yet doing input device discovery and registration.

PySide6.QtGui.QPointingDevice.setCapabilities(caps)
Parameters

capsCapabilities

Note

This function is deprecated.

Please use the constructor rather than setters.

PySide6.QtGui.QPointingDevice.setMaximumTouchPoints(c)
Parameters

c – int

Note

This function is deprecated.

Please use the constructor rather than setters.

PySide6.QtGui.QPointingDevice.setType(devType)
Parameters

devTypeDeviceType

Note

This function is deprecated.

Please use the constructor rather than setters.

Sets the device type devType and infers the pointer type.

PySide6.QtGui.QPointingDevice.uniqueId()
Return type

PySide6.QtGui.QPointingDeviceUniqueId