I'm trying load a jpg image, but the code doesnt works.

Look, have this:

Qt Code:
  1. ...
  2. QImage *img1;
  3. QLabel *imgLbl1;
  4.  
  5.  
  6. img1->load(fileName);
  7.  
  8. imgLbl1->clear();
  9.  
  10. imgLbl1->setPixmap(QPixmap::fromImage(*img1));
  11. ...
To copy to clipboard, switch view to plain text mode 

This code only works with png, gif and bmp files but doesnt with jpg.

Any advice?

Thanks.