Quote Originally Posted by dbrmik View Post
I assume that the conversion from 8bpp to 32bpp doesnt scale the pixel values and that is why my label is black?
I'm not sure what you mean by that but I think the answer is "no".

Do I have to create a colour table, how do I associate the colour table with my pixmap? I am confused.
Try something obvious:
Qt Code:
  1. QImage image(100,100, QImage::Format_Indexed8);
  2. image.setNumColors(2);
  3. image.setColor(0, qRgb(0,0,0));
  4. image.setColor(1, qRgb(255,255,0));
  5. image.fill(0);
  6. for(int i=0;i<100;i++)
  7. image.setPixel(i, i, 1);
  8. QLabel *label = new QLabel;
  9. label->setPixmap(QPixmap::fromImage(image));
  10. label->show();
To copy to clipboard, switch view to plain text mode