Please run and see this example, use attached image.
#include <QApplication>
#include <QLabel>
#include <QBitmap>
int main(int argc, char *argv[])
{
lbl.setPixmap(pixmap);
lbl.setMask(pixmap.mask());
lbl.show();
app.setQuitOnLastWindowClosed(true);
return app.exec();
}
#include <QApplication>
#include <QLabel>
#include <QBitmap>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel lbl;
QPixmap pixmap("yell.png");
lbl.setPixmap(pixmap);
lbl.setMask(pixmap.mask());
lbl.show();
app.setQuitOnLastWindowClosed(true);
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks