Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-7468

QPixmap::load don't take care anymore if data was QPixmapData::BitmapType

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.6.2
    • 4.6.1
    • Image formats
    • 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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            metalban Alban
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes