I just started with Qt, but shouldn't line 4 be:
Qt Code:
  1. for (int i=0; i < image1.width(); i++)
To copy to clipboard, switch view to plain text mode