I have a .bmp image that I would like to use as a cursor for my GUI. The QCursor Documentation suggests that this is possible (\"To create a cursor with your own bitmap, eit
If it can help anyone googling to here, and provided you can give a value to whatEverColor
to be the transparent color. In __init__
:
pm = QtGui.QPixmap('image.bmp')
bm = pm.createMaskFromColor(whatEverColor, Qt.MaskOutColor)
pm.setAlphaChannel(bm)
cursor = QtGui.QCursor(pm)
self.setCursor(cursor)