You can't just pass the pixel data, you need to pass the data in a format of your choice. For example if you want to feed the data in BMP format, the data has to contain the BMP header. Check out the link I gave you, you have to construct a block of data according to the rules mentioned there. If you just want to set some pixels though, I suggest you use QImage::setPixel() instead.
Bookmarks