QMouseDevice Class

class Qt3DInput::QMouseDevice

Delegates mouse events to the attached MouseHandler objects. More...

Header: #include <QMouseDevice>
qmake: QT += 3dinput
Since: Qt 5.5
Instantiated By: MouseDevice
Inherits: Qt3DInput::QAbstractPhysicalDevice

This class was introduced in Qt 5.5.

Public Types

enum Axis { X, Y, WheelX, WheelY }

Properties

Public Functions

float sensitivity() const
bool updateAxesContinuously() const

Public Slots

void setSensitivity(float value)
void setUpdateAxesContinuously(bool updateAxesContinuously)

Signals

void sensitivityChanged(float value)
void updateAxesContinuouslyChanged(bool updateAxesContinuously)

Detailed Description

A QMouseDevice delegates mouse events from physical mouse device to QMouseHandler objects. The sensitivity of the mouse can be controlled with the QMouseDevice::sensitivity property, which specifies the rate in which the logical mouse coordinates change in response to physical movement of the mouse.

See also QMouseHandler.

Member Type Documentation

enum QMouseDevice::Axis

The mouse axis.

ConstantValue
Qt3DInput::QMouseDevice::X0
Qt3DInput::QMouseDevice::Y1
Qt3DInput::QMouseDevice::WheelX2
Qt3DInput::QMouseDevice::WheelY3

See also Qt3DInput::QAnalogAxisInput::setAxis.

Property Documentation

sensitivity : float

Holds the sensitivity of the mouse device. The default is 0.1.

Access functions:

float sensitivity() const
void setSensitivity(float value)

Notifier signal:

void sensitivityChanged(float value)

updateAxesContinuously : bool

If true, axes will be updated anytime they change regardless of whether any mouse button is being pressed. Otherwise, axes are updated only when one of the mouse buttons is being pressed.

The default value is false.

This property was introduced in Qt 5.15.

Access functions:

bool updateAxesContinuously() const
void setUpdateAxesContinuously(bool updateAxesContinuously)

Notifier signal:

void updateAxesContinuouslyChanged(bool updateAxesContinuously)