QImage::loadFromData does samething with QPixmap::loadFromData which I've already told.
When you want to create an image from raw data, you have to create the QImage instance with the constructor which takes raw data, like:
QImage image(nativeBuffer, nativeWidth, nativeHeight, QImage::Format_RGB32);