Thanks. I tried this. Doesn't work.

Qt Code:
  1. QLabel *pic = new QLabel(fParentQframe);
  2. pic->setGeometry(20,3,28,28);
  3. QPixmap pix("<path_to_a_jpeg_image>");
  4. QPixmap scaled = pix.scaled(28,28,Qt::KeepAspectRatio,Qt::SmoothTransformation);
  5.  
  6.  
  7. QBitmap map(28,28);
  8.  
  9. QPainter painter( &map );
  10. painter.setPen( Qt::transparent );
  11.  
  12. QRect rect( 0,0,28,28 );
  13. painter.drawRoundRect( 0, 0, 28, 28,8,8);
  14. painter.drawRoundRect( rect,8,8 );
  15.  
  16. pix.setMask(map);
  17.  
  18. pic->setPixmap(scaled);
To copy to clipboard, switch view to plain text mode