You should stick to RGB32.
The problem is in line 31 of the code you posted:
pixel = rgbImage(x,y);
pixel = rgbImage(x,y);
To copy to clipboard, switch view to plain text mode
As before, you can't assign that directly.
First convert it to qRgb, using qRed, etc...
It is the reverse transformation of what you did before.
EDIT: Actually, I think it is better to use the macros from your header to extract the components and build a qRgb:
#define RED(pixel) ((pixel) & 0xff)
#define GREEN(pixel) (((pixel)>>8) & 0xff)
#define BLUE(pixel) (((pixel)>>16) & 0xff)
#define RED(pixel) ((pixel) & 0xff)
#define GREEN(pixel) (((pixel)>>8) & 0xff)
#define BLUE(pixel) (((pixel)>>16) & 0xff)
To copy to clipboard, switch view to plain text mode
Regards
Bookmarks