QPlatformCursor Class

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

Header: #include <QPlatformCursor>
Inherits: QObject

Public Types

flags Capabilities
enum Capability { OverrideCursor }

Public Functions

virtual void clearOverrideCursor()
virtual void setOverrideCursor(const QCursor &)
virtual QSize size() const

Detailed Description

\since5.0 \internal \preliminary \ingroup qpa

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 Type Documentation

enum QPlatformCursor::Capability
flags QPlatformCursor::Capabilities

\since5.10

ConstantValueDescription
QPlatformCursor::OverrideCursor0x1Indicates that the platform implements QPlatformCursor::setOverrideCursor() and QPlatformCursor::clearOverrideCursor().

The Capabilities type is a typedef for QFlags<Capability>. It stores an OR combination of Capability values.

Member Function Documentation

[virtual] void QPlatformCursor::clearOverrideCursor()

Reimplement this function in subclass to clear the override cursor.

\since5.10

See also QGuiApplication::clearOverrideCursor() and Capabilities.

[virtual] void QPlatformCursor::setOverrideCursor(const QCursor &)

Reimplement this function in subclass to set an override cursor on the associated screen and return true to indicate success.

This function can be implemented on platforms where the cursor is a property of the application or the screen rather than a property of the window. On these platforms, the OverrideCursor capability should be set.

\since5.10

See also QGuiApplication::setOverrideCursor() and Capabilities.

[virtual] QSize QPlatformCursor::size() const

Returns the size of the cursor, in native pixels.