Converting bytearray to pixmap
-
QByteArray ba;
QBuffer buffer(&ba);
QImage img;
img.load("hai.png");
img.save(&buffer,"PNG");how should i display the image on to a label;
i think the loaded image is saved in buffer .
i tried to write it
IO_WriteOnly function of File
but am getting error as IO_Write is not declared in the scope
though QFile is includedcan anybody help me out in solving
-
Hi,
Since you are reading a file, what don't you use "this":http://qt-project.org/doc/qt-4.8/qpixmap.html#QPixmap-4 ?