Finally the line is visible over the image

The co-ordinates I used for drawing line were main culprit here
painter.drawLine(250,300,500,300);

Qt Code:
  1. also
  2.  
  3. qDebug() << goodLoad << pixmap.isNull() << pixmap.size() << pixmap.depth();
  4.  
  5. shows
  6.  
  7. true false QSize(533, 292) 32
To copy to clipboard, switch view to plain text mode 
if I use ur co-ordinate,

painter.drawLine(40, 40, 200, 280);

line is drawn.....