I have the following code to paint a semi-transparent label on an image and then write on that label:
// topLabel->setAttribute(Qt::WA_NoSystemBackground);
// a white semi-transparent background
topLabel->setPalette(palette);
topLabel->setText(*text);
topLabel = new QTextEdit(imageLabel);
// topLabel->setAttribute(Qt::WA_NoSystemBackground);
QPalette palette;
// a white semi-transparent background
palette.setColor(QPalette::Window, QColor(255, 255, 255, 127));
topLabel->setPalette(palette);
topLabel->setText(*text);
To copy to clipboard, switch view to plain text mode
It creates a white, opaque background.
It topLabel is QLabel, it creates a transparent background.
In any case, it is not semi-transparent.
Bookmarks