From QPixmap doc:
Returns true if the pixmap was successfully loaded; otherwise returns false.
Qt Code:
  1. QPixmap qimg;
  2. if (qimg.load(filename)) //if this warning is NOT printed, it means the image is NOT loaded - you need to add '!' to the if statement.
  3. qWarning("Failed to load target image");
To copy to clipboard, switch view to plain text mode 

you should also test against isNull(), to be on the safe side.