Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.1.1
-
Windows 7
Description
This is similar than QTBUG-31504 but happens when you have two cursors with masked bitmaps. I Can't reproduce issue with QTBUG-31504 example so not duplicate.
Qt 5.0.0 changes cursor but Qt 5.1.1 doesn't.
class MyWidget : public QWidget { Q_OBJECT public: MyWidget(QWidget * w=0) : QWidget(w) { c1 = new QCursor( QPixmap(QLatin1String(":/cursor1.png"),"png",Qt::MonoOnly), QPixmap(QLatin1String(":/mask.png"),"png",Qt::MonoOnly), 0,0); c2 = new QCursor( QPixmap(QLatin1String(":/cursor2.png"),"png",Qt::MonoOnly), QPixmap(QLatin1String(":/mask.png"),"png",Qt::MonoOnly), 0,0); current = c1; setCursor(*current); } void mousePressEvent(QMouseEvent*) { if(current != c1) current = c1; else current = c2; setCursor(*current); } private: QCursor* c1; QCursor* c2; QCursor* current; };
full application: cursorpixmap.zip
Attachments
Issue Links
- is replaced by
-
QTBUG-33383 Unable to view multiple bitmap cursors using certain constructors.
- Closed