Hello Everybody!
I'm a newbie of Qt. I have a problem need help. I want insert an image with transparent background (icon-home.png) in to a window which I created.
This window I set background by follow command:
window->setStyleSheet("background-image: url(./images/bg.jpg");
window->setStyleSheet("background-image: url(./images/bg.jpg");
To copy to clipboard, switch view to plain text mode
Image I insert by:
image
->setPixmap
(QPixmap("./images/icon-home.png"));
QLabel *image = new QLabel;
image->setPixmap(QPixmap("./images/icon-home.png"));
To copy to clipboard, switch view to plain text mode
Then:
layout->addWidget(image);
window->setLayout(layout);
layout->addWidget(image);
window->setLayout(layout);
To copy to clipboard, switch view to plain text mode
but when program run, the area transparent of image haven't color of base background (otherwise, the area stransparent of image cover base background).
How to make this area transparent dont cover base background ?
Thanks!
Bookmarks