hi,

can anyone say me how to draw an image of size 600x400. i tried as follows
Qt Code:
  1. QPainter p( this );
  2. uint x,y;
  3. x=550;
  4. y=500;
  5. QImage image(x,y,32 );
  6. image.setAlphaBuffer( true );
  7. for ( uint j =0; j <x; j++ )
  8. {
  9. for ( uint i =0; i <y; i++ )
  10. {
  11. QRgb pixel;
  12. pixel = qRgb(0,0,255);
  13. image.setPixel( i, j, pixel );
  14. }
  15. }
  16. p.drawImage(QPoint(0,0),image,0);
To copy to clipboard, switch view to plain text mode 

when i executed this it said the following error:
"
QImage::scanLine: Index 500 out of range
Segmentation fault ".

but i can succesfuly draw an image of size 500x500.
can anyone say me why is that so ..

thanks in advance,

saravanan