Thanks, i did it your way , except, last two lines (it didn't work for me :S):
Qt Code:
  1. .......
  2. for(int i=0;i<p.size();i++){
  3. x.append(p.at(i).x());
  4. y.append(p.at(i).y());
  5. }
To copy to clipboard, switch view to plain text mode 

..but now this looks primitive and i think it can be done a lot shorter and faster..