QPlatformCursor Class

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

頭: #include <QPlatformCursor>
Since: Qt 4.8
繼承: QObject

公共函數

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 )

額外繼承成員

詳細描述

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

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

另請參閱 QPlatformCursorImage .

成員函數文檔編製

QPlatformCursor:: QPlatformCursor ( QPlatformScreen * screen )

構造 QPlatformCursor 為給定 screen .

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

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.

另請參閱 QCursor::pos ().

[虛擬] void QPlatformCursor:: pointerEvent (const QMouseEvent & event )

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

另請參閱 setPos ().

[虛擬] void QPlatformCursor:: setPos (const QPoint & pos )

另請參閱 pos ().