I can't understand why when m_backgoundTransparency is 255 area which supposed to be transparent becomes black. As I Alpha is 255 means totally transparent?

Qt Code:
  1. QPixmap tempPixmap(m_backroundPixmap->size());
  2.  
  3. tempPixmap.fill(Qt::transparent);
  4. QPainter p(&tempPixmap);
  5.  
  6. p.setCompositionMode(QPainter::CompositionMode_Source);
  7. p.drawPixmap(0,0,*m_backroundPixmap);
  8. p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
  9. p.fillRect(tempPixmap.rect(),QColor(0,0,0,m_backgoundTransparency));
  10. p.end();
  11. /* */
  12. *m_backroundPixmap = tempPixmap;
To copy to clipboard, switch view to plain text mode