The QCursor
class provides methods get and set a QPixmap
or a QBitmap
on the cursor. I can create a cursor from one of the standard shapes, e.g. Qt::ArrowCursor
. However, if I do so, I cannot get the pixmap/bitmap of the cursor!
QCursor cursor(Qt::ArrowCursor);
qDebug() << cursor.pixmap().isNull()
<< cursor.bitmap()
<< cursor.mask();
Will generate the output
true 0x00 0x00
I know the documentation says it's not possible, but I need to get the pixmap/icon/image/animation/whatever of a specific cursor.
So, is there a way to get the icon of a standard cursor from Qt? I'm wondering because if you drag an item from a QListView
, it will show both, the standard cursor an the image of whatever I am dragging!