If you set an icon, you have to load it into memory anyway and I'm sure you can spare few hundred bytes for a small png image. But if you don't want it that way, them simply create a QPixmap from file:
Qt Code:
  1. QApplication app(...);
  2. app.setIcon(QPixmap("my_icon.xpm"));
To copy to clipboard, switch view to plain text mode 

just remember that you're using a relative path here.