mule
31st May 2006, 21:11
Does QIcon::QIcon( const QPixmap & pixmap ) take ownership of its input parameter, pixmap?
Does QPixmap::setAlphaChannel( const QPixmap & alphaChannel ) take ownership of its input parameter, alphaChannel?
In other words, for ...
QPixmap * pPixmap;
QBitmap * pBitmap;
QPainter P;
QIcon * pIcon;
pPixmap = <pointer to image previously read in>;
pBitmap = new QBitmap( * pPixmap );
P.begin( (QPaintDevice *) pBitmap );
// painting here
P.end();
pPixmap->setAlphaChannel( * pBitmap );
pIcon = new QIcon( * pPixmap );
...
delete pIcon;
... does the delete statement also delete the Pixmap and/or the Bitmap?
Does QPixmap::setAlphaChannel( const QPixmap & alphaChannel ) take ownership of its input parameter, alphaChannel?
In other words, for ...
QPixmap * pPixmap;
QBitmap * pBitmap;
QPainter P;
QIcon * pIcon;
pPixmap = <pointer to image previously read in>;
pBitmap = new QBitmap( * pPixmap );
P.begin( (QPaintDevice *) pBitmap );
// painting here
P.end();
pPixmap->setAlphaChannel( * pBitmap );
pIcon = new QIcon( * pPixmap );
...
delete pIcon;
... does the delete statement also delete the Pixmap and/or the Bitmap?