How Can I Offset a Pixmap with QPainter?



  • Hello, I am trying to clip a small part of a pixmap and offset the pixmap so it draws the clipped area at 0,0. For some reason when I pass in offset values to the drawPixmap() function it is not working. Can someone please help me with this? Thanks.



  • Please show the code that you tried, then we'll be able to tell you what's going on. The
    @void QPainter::drawPixmap ( const QRect & target, const QPixmap & pixmap, const QRect & source )@
    method should do just what you need.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.