I am trying to create a new icon set from an existing one by smooth scaling each of it’s pixmaps. When I try to do this, I get an assertion when I am trying to convert the image back to a pixmap just before setting the new pixmap in the iconset. I looked into it further and found that even a simple round-trip to and from an image is not working, and I receive the following assertions:

Qt Code:
  1. ASSERT: "hBitmap" in kernel\qpixmap_win.cpp (117)
  2. ASSERT: "data->realAlphaBits" in kernel\qpixmap_win.cpp (118)
To copy to clipboard, switch view to plain text mode 

Here is some sample code that shows what I was trying to do:

Qt Code:
  1. QIconSet *dest = new guiIconSet;
  2.  
  3. for ( int size = 0 ; size < 2 ; size++ )
  4. {
  5. for ( int mode = 0 ; mode < 3 ; mode++ )
  6. {
  7. for ( int state = 0 ; state < 2 ; state++ )
  8. {
  9. // Get the image from the source iconsets pixmap
  10. srcImg = pixmap((QIconSet::Size )size, (QIconSet::Mode )mode, (QIconSet::State )state);
  11.  
  12. if ( ! srcImg.isNull() )
  13. {
  14. guiPixmap destPm;
  15.  
  16. // Get the dest pixmap from the dest image
  17. destPm = srcImg;
  18.  
  19. if ( ! destPm.isNull() )
  20. dest->setPixmap(destPm, (QIconSet::Size )size, (QIconSet::Mode )mode, (QIconSet::State )state);
  21. }
  22. }
  23. }
  24. }
To copy to clipboard, switch view to plain text mode 
Thanks in advance.