Hello,
I'm just trying to create a Qimage passing a buffer or ARGB.
So I tried this:
Qt Code:
  1. uchar* testB = new uchar[384*288*4];
  2. QImage image = QImage((uchar*) testB, 384, 288, QImage::Format_ARGB32);
To copy to clipboard, switch view to plain text mode 

On the second line I get an error and it occurs when in the QImage constructor
I access d->depth (set on 0 at the first line):

Qt Code:
  1. QImage::QImage(uchar* data, int width, int height, Format format)
  2. {
  3. d = 0;
  4. const int depth = depthForFormat(format);
  5. const int bytes_per_line = ((width * d->depth + 31)/32) * 4;
To copy to clipboard, switch view to plain text mode 

Am I doing something wrong or it's a QT bug? (I'm using 4.2.1)

thanks

bye