Hi,

I need to read a QImage data into QMovie. QImage may contain a gif, png or jpg file.. If i use filepath instead of QImage:

movie->setFileName("path")

everything goes well. I couldnt figure out how to do that for QImage. In the following code "state" returns true but "Movie->isValid()" returns false:

Qt Code:
  1. QBuffer buffer(&ba);
  2. buffer.open(QIODevice::WriteOnly);
  3. bool state= image->save(&buffer,"PNG");
  4. Movie = new QMovie(&buffer);
To copy to clipboard, switch view to plain text mode 

Any idea?

Thanks in advance...