How to save a QImage with transparency?

  alpha-transparency, c++, qimage, qt, transparency

I want to create a png image with transparency.

QImage image(dim, dim, QImage;;Format_ARGB32);

and I set the

qRgba(qRed, qGreen, qBlue, alpha)

But the alpha channel does not modify the transparency/opacity of the color, instead modify the intensity color (from white to color).

Thus, how can I set the transparency of the QImage (which I save on file)?

I have to use QImage, no other stuff.

Thank you.

Source: Windows Questions C++