Hi,

i try to clip a QPicture:

Qt Code:
  1. QPicture pic;
  2. QPicture target;
  3.  
  4. pic.load("c:/pic.png");
  5.  
  6. if ( !pic.isNull ( ) )
  7. {
  8. QRect cut ( 0, pic.height()-250 ,250,250);
  9. QPainter painter ( &target );
  10. painter.setClipRect(cut);
  11. painter.drawPicture(0, 0, pic);
  12. painter.end();
  13. }
  14.  
  15. target.save("c:/picClip.png");
To copy to clipboard, switch view to plain text mode 

This Code don't work, why?

Thank's in advance

Whitefurrows