from pixmap to png
QString format = "png";
Pixmap.save(fileName, format.toAscii());
from pixmap to png
QString format = "png";
Pixmap.save(fileName, format.toAscii());
Yes, switch to Windows, QPixmap::toImage() is a no-op there. BTW. You don't convert it from pixmap to png, you convert it from pixmap to image and then save it as png.
if I understood that correctly:
use QPixmap::toImage(). It just happens to be fast on windows because there is nothing (or not much) to do internally. For you as a Qt user you always do grabWindow(), then QPixmap::toImage(), then QImage::save().
(This sequence just happens to be faster on the windows platform.)
Bookmarks