Modify alpha channel transparency of a windowless QLabel
I have a very small Qt application that uses labels to display a jpeg image without first putting it in a window. (I got a lot of help from Display QImage with QtGui ) Now I would like to change the alpha channel of this jpeg to make the image partially transparent. I have tried the following without any luck int main (int argc, char *argv[]) { QApplication app(argc, argv); QLabel label (0, Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); label.resize(1280,720); label.setPixmap(QPixmap("test.jpg")); label.setScaledContents(true); // This line should set the alpha transparency to 50% label