QPlatformCursorImage Class

The QPlatformCursorImage class provides a set of graphics intended to be used as cursors. 更多...

头: #include <QPlatformCursorImage>
Since: Qt 4.8

公共函数

QPlatformCursorImage (const uchar * data , const uchar * mask , int width , int height , int hotX , int hotY )
QPoint hotspot ()
QImage * image ()
void set (const uchar * data , const uchar * mask , int width , int height , int hx , int hy )
void set (const QImage & image , int hx , int hy )
void set (Qt::CursorShape id )

详细描述

The QPlatformCursorImage class provides a set of graphics intended to be used as cursors.

另请参阅 QPlatformCursor .

成员函数文档编制

QPlatformCursorImage:: QPlatformCursorImage (const uchar * data , const uchar * mask , int width , int height , int hotX , int hotY )

Sets the cursor image to the graphic represented by the combination of data and mask , with dimensions given by width and height and a hotspot at the point specified by ( hotX , hotY ).

另请参阅 set ().

QPoint QPlatformCursorImage:: hotspot ()

Return the cursor's hotspot

QImage * QPlatformCursorImage:: image ()

Return the cursor graphic as a pointer to a QImage

void QPlatformCursorImage:: set (const uchar * data , const uchar * mask , int width , int height , int hx , int hy )

Sets the cursor image to the graphic represented by the combination of data and mask , with dimensions given by width and height and a hotspot at the point specified by ( hx , hy ).

The image data specified by data must be supplied in the format described by QImage::Format_Indexed8 .

The corresponding mask data specified by mask must be supplied in a character array containing packed 1 bit per pixel format data, with any padding bits at the end of the array. Bits of value 0 represent transparent pixels in the image data.

void QPlatformCursorImage:: set (const QImage & image , int hx , int hy )

Sets the cursor image to the given image , with the hotspot at the point specified by ( hx , hy ).

void QPlatformCursorImage:: set ( Qt::CursorShape id )

Calling this method sets the cursor image to the specified shape

id is one of the defined Qt::CursorShape 值。

If id is invalid, Qt::BitmapCursor , or unknown by the implementation, Qt::ArrowCursor 被使用,取而代之。