QPixmap originPixmap;
QPixmap colorizedPixmap = originPixmap;
QPainter painter(&colorizedPixmap);
painter.setCompositionMode(QPainter::CompositionMode_SourceIn);
painter.fillRect(colorizedPixmap.rect(), qRgb(0, 255, 0));
painter.end();
QLabel label;
label->setPixmap(colorizedPixmap);