xiongxiongchuan
28th August 2010, 09:17
hi ,i want to creat a custorm cursor from a bmp file, i used the code as below ,anyone can help me?
QBitmap pic(":/MainForm/images/CrossCursor.bmp",0);
pic.createMaskFromColor(QColor(Qt::red),Qt::MaskOu tColor);
QCursor curs(pic,-1,-1);
this->setCursor(curs);
QBitmap pic(":/MainForm/images/CrossCursor.bmp",0);
pic.createMaskFromColor(QColor(Qt::red),Qt::MaskOu tColor);
QCursor curs(pic,-1,-1);
this->setCursor(curs);