hi
i want to paint on an image.How to make the image background as transparent.

the following code can change the background color of the image .

Qt Code:
  1. QColormap colormap=QColormap::instance();
  2. image.fill(colormap.pixel(Qt::green));
To copy to clipboard, switch view to plain text mode 

but it fails to make the background transparent even when the code is changed to
Qt Code:
  1. QColormap colormap=QColormap::instance();
  2. image.fill(colormap.pixel(Qt::transparent));
To copy to clipboard, switch view to plain text mode 

i wnt to paint on aQImage rather than QPixmap is because, i am painting in a multithreaded program.

how to make the background of a QImage as transparent.