[Qt-interest] draw a pixmap with a table

Samuel Rødal sroedal at trolltech.com
Fri May 15 15:30:12 CEST 2009


Stefanos Antaris wrote:
> Hello.I am going to receive a 2 dimension table which is going to have 
> unsigned char on each cell.Every cell is going to show me the brightness 
> of the pixels.Now i found that QPixmap can do that but i can't manage 
> it.Can anyone help me how could i draw a widget with that table?With 
> QPixmap or something else?Thanks.

Use QImage when you need to manipulate individual pixels. A QImage with 
format QImage::Format_Indexed8 seems to be exactly what you need.

--
Samuel



More information about the Qt-interest-old mailing list