Hiya,

You'll have to use a rectangular area to store your elliptical image in as that is the only shape we can make bitmaps, pixmaps, pictures and images. The "trick", as Grimlock says, is to leave the pixels outside of the transparent.

Qt Code:
  1. if (!loaded.load(":/old-computer.jpg", "JPEG"))
  2. {
  3. QMessageBox::information(0, "loaded", "image loading failed...");
  4. }
  5.  
  6. saved = new QPixmap(loaded.size());
  7.  
  8. QPainterPath clipPath;
  9. clipPath.addEllipse(loaded.rect());
  10.  
  11. QPainter painter(saved);
  12. painter.setClipPath(clipPath);
  13.  
  14. painter.drawImage(saved->rect(), loaded.toImage());
  15.  
  16. ui->loaded->setPixmap(loaded);
  17. ui->saved->setPixmap(*saved);
To copy to clipboard, switch view to plain text mode 

ui->loaded and ui->saved are QLabels. loaded and saved are both QPixmaps, although saved is a pointer to a QPixmap.

Matthew.