Quote Originally Posted by sarbh20ss View Post
But when I change the no of iterations to even as less as 2 it still draws the outline correctly.

Also when I change the function from 'lineTo( QPointF )' to 'moveTo( QPointF ) it still draws same outline correctly. I can not understand why this is happening?
You are always drawing the full path so that's hardly surprising:

Qt Code:
  1. p.drawPath(mypath);
To copy to clipboard, switch view to plain text mode 


Also how can I know that out of the 49 elements which are of 'moveTo' or 'lineTo' or any other type?
elementAt() returns a type where one of the attributes is the type of the element.