QPixmap::setMask() / QWidget::setMask()
Two methods that i have tried for displaying clipped image:-
1.================
pixmap->setMask(bitmap1);
painter->drawPixmap(pixmap);
2.================
widget->setMask(bitmap1);
painter->drawPixmap(pixmap);
Both methods works correctly (at least in my case) i.e. displays clipped image.
But i'm still confused which method should i use; or should i combine both methods like this: -
pixmap->setMask(bitmap1);
widget->setMask(bitmap1);
painter->drawPixmap(pixmap);
So, please help. :)
EDIT: I'm using qt 4.1.1
Re: QPixmap::setMask() / QWidget::setMask()
On second thought it seems that correct way is to use method #2; and if need be, use pixmap->setMask(bitmap1) along with that. :cool: