Ok, sounds good, but , I'm sorry but all I can manage is to make a transparent pixmap of the right size!
{
QPixmap pixmap
(QPixmap::grabWidget ( this ));
//just to get the right size pixmap.fill ( Qt::transparent );//ok, now I have a transparent pixmap
//draw text onto the pixmap ??? how??
QBitmap bmp
(QBitmap::fromImage(pixmap.
toImage()));
//is this the only way from QPixmap to QBitmap?
QBitmap mask
(pixmap.
mask());
//what mask will this give me?? label->setMask(theMask);
}
func(QString text)
{
QPixmap pixmap(QPixmap::grabWidget ( this ));//just to get the right size
pixmap.fill ( Qt::transparent );//ok, now I have a transparent pixmap
//draw text onto the pixmap ??? how??
QBitmap bmp(QBitmap::fromImage(pixmap.toImage()));//is this the only way from QPixmap to QBitmap?
QBitmap mask(pixmap.mask());//what mask will this give me??
label->setMask(theMask);
}
To copy to clipboard, switch view to plain text mode
sorry, I'm a little confused
oh, one more question: why won't pixmap.createMaskFromColor() work?
thanks, for your help
K
Bookmarks