I am using a QPixmap to take a screenshot of my desktop. I would like to convert this QPixMap to QByteArray.

How ?