void setPixel ( const QPoint & position, uint index_or_rgb )
Sets the pixel index or color at the given position to index_or_rgb.
If the image's format is either monochrome or 8-bit, the given index_or_rgb value must be an index in the image's color table, otherwise the parameter must be a QRgb value.
If position is not a valid coordinate pair in the image, or if index_or_rgb >= numColors() in the case of monochrome and 8-bit images, the result is undefined.
See also pixel() and Pixel Manipulation.