From: Tom B. (Tehom) <te...@pa...> - 2011-09-13 00:11:06
|
> On Monday, September 12, 2011, D. Michael McIntyre wrote: > [...] > m_segmentsDrawBuffer is a QPixmap. QPixmap::resize() no longer exists. > The > API docs say to replace > > pixmap.resize(width, height) > > with > > pixmap = pixmap.copy(0, 0, width, height) > > > According to the docs, this was the way the conversion was supposed to be > done. I've looked at these lines several times, and I don't see any > parameters out of order, type changes, or other things that might explain > why > what is supposed to be equivalent code is clearly not doing an equivalent > job. Just to throw my $0.02 in, are "width" and "height" always larger than the originals? And do we know what QPixmap::copy does in that case? I ask because http://www.greyc.ensicaen.fr/ensicaen/Docs/Qt4/qpixmap.html says that copy "Returns a deep copy of the subset of the pixmap that is specified by the given rectangle. " So what does it do when the rectangle is too big? I don't know and it doesn't say, but if what it does is copy nothing or make a blank pixmap, that might explain what you are seeing. Or I could be totally wrong, since I'm just learning Qt. Tom Breton (Tehom) |