To be more exact, done this:

Qt Code:
  1. void ImageViewer::save()
  2. {
  3. QString s = QFileDialog::getSaveFileName(this,"Choose a filename to save under",QDir::currentPath(),"Images (*.png *.xpm *.jpg)");
  4. QImage image(s);
  5. QBuffer buffer(&ba);
  6. buffer.open(QIODevice::WriteOnly);
  7. image.save(&buffer, "JPG");
  8. }
To copy to clipboard, switch view to plain text mode 

doesnt save nothing as i specify
What have i missunderstood ?