Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.6.1
-
None
-
8721d060a67a01ac891cab9d3d17aacf7373bcf0
Description
QPixmap::load function now create a tmp QPixmapData of type QPixmapData::PixmapType.
But if this pixmap inherits from QBitmap the existing data of type QPixmapData::BitmapType is replaced by tmp which is always QPixmapData::PixmapType.
Therefore it's impossible now to load QBitmap from files and create cursors for example because the depth of the QBitmap is 32 instead of 1
Example:
QBitmap bm ("c:/cursor.bmp"); // monochrome bitmap file
QBitmap bmMask ("c:/cursor_m.bmp"); // monochrome bitmap mask file
QCursor cu (bm, bmMask);
---> qWarning("QCursor: Cannot create bitmap cursor; invalid bitmap(s)"); because the 2 bitmap has a depth of 32 instead of 1 because of the error of QPixmapData::PixmapType on data member of QPixmap class in load function