I have a problem again, with the function
painter.setBackgroundMode(Qt::TransparentMode);
painter.
setRenderHint(QPainter::Antialiasing);
painter.drawImage(point, image);
} // paintEvent
void CarmenTiger::paintEvent(QPaintEvent *) {
QPainter painter(this);
QPointF point;
const QImage image = QImage("tiger.png");
painter.setBackgroundMode(Qt::TransparentMode);
painter.setRenderHint(QPainter::Antialiasing);
painter.drawImage(point, image);
} // paintEvent
To copy to clipboard, switch view to plain text mode
the program draw the image over a rectangle and using the function
topLevelLabel.setPixmap(pixmap);
topLevelLabel.setMask(pixmap.mask());
} // paintEvent
void CarmenTiger::paintEvent(QPaintEvent *) {
QLabel topLevelLabel;
QPixmap pixmap(":/tiger.png");
topLevelLabel.setPixmap(pixmap);
topLevelLabel.setMask(pixmap.mask());
} // paintEvent
To copy to clipboard, switch view to plain text mode
the program draw only the rectangle.
Any idea of what is wrong?
Bookmarks