16,175
社区成员
发帖
与我相关
我的任务
分享
void paintEvent( QPaintEvent * event)
{
QPixmap temp(toolBarPixmap.size());
temp.fill(Qt::transparent);
QPainter p( &temp );
p.setCompositionMode(QPainter::CompositionMode_Source);
p.drawPixmap(0, 0, toolBarPixmap);
p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
p.fillRect(temp.rect(),QColor(0,0,0,125));
tempLabel->setPixmap(temp);
}