Qt Reference Documentation

- Qt 4.8
- ALL VERSIONS

- A
- A
- A
- Print

# QPlatformCursor Class Reference

The QPlatformCursor class provides information about pointer device events (movement, buttons), and requests to change the currently displayed cursor. More...

     #include <QPlatformCursor>

Inherits: QObject.

This class was introduced in Qt 4.8.

- List of all members, including inherited members

## Public Functions

| QPlatformCursor ( QPlatformScreen * screen )
virtual void | changeCursor ( QCursor * widgetCursor, QWidget * widget ) = 0
virtual void | pointerEvent ( const QMouseEvent & event )
virtual QPoint | pos () const
virtual void | setPos ( const QPoint & pos )

- 29 public functions inherited from QObject

### Additional Inherited Members

- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 1 signal inherited from QObject
- 7 static public members inherited from QObject
- 8 protected functions inherited from QObject

## Detailed Description

The QPlatformCursor class provides information about pointer device events (movement, buttons), and requests to change the currently displayed cursor.

Note that QPlatformCursor does not include any graphics for display. An application that sets a QCursor may provide its own graphics.

See also QPlatformCursorImage.

## Member Function Documentation

### QPlatformCursor::QPlatformCursor ( QPlatformScreen * screen )

Constructs a QPlatformCursor for the given screen.

### void QPlatformCursor::changeCursor ( QCursor * widgetCursor, QWidget * widget )`[pure virtual]`

This method is called by Qt whenever the cursor graphic should be changed.

Implementation of this method is mandatory for a subclass of QPlatformCursor.

widgetCursor is a pointer to the QCursor that should be displayed.

widget is a pointer to the widget currently displayed at QCursor::pos(). Note that this may be 0 if the current position is not occupied by a displayed widget.

See also QCursor::pos().

### void QPlatformCursor::pointerEvent ( const QMouseEvent & event )`[virtual]`

This method is called by Qt whenever a QMouseEvent is generated by the underlying pointer input. event is a reference to the QMouseEvent in question. A default do-nothing implementation is provided.

### QPoint QPlatformCursor::pos () const`[virtual]`

See also setPos().

### void QPlatformCursor::setPos ( const QPoint & pos )`[virtual]`

See also pos().