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

QWidget::setMask() doesn't allow to set fully transparent mask

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 4.8.2
    • GUI: Painting
    • None
    • Windows 7

    Description

      For example:

          QLabel *l = new QLabel;
          l->setFixedSize(64, 64);
      
          QBitmap bm(l->size());
          bm.fill(Qt::color0);
          l->setMask(bm);
      

      doesn't work, after that widget doesn't have a mask at all. Workaround:

          QLabel *l = new QLabel;
          l->setFixedSize(64, 64);
      
          QBitmap bm(l->size());
          bm.fill(Qt::color0);
          QPainter p(&bm);
          p.setPen(Qt::black);
          p.drawPoint(0, 0); // or something
          l->setMask(bm);
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            dmitry64 Dmitry
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes