QPixmap has a copy method that accepts QRect. can I cut part of an image based on QPainterPath?
Well, like so:
QPixmap copyPath(const QPixmap & src, const QPainterPath & area) { QPixmap result(src.size()); QPainter canvas(&result); canvas.setClipPath(area); canvas.drawPixmap(0,0,src); return result; }
Source: https://ru.stackoverflow.com/questions/446804/More articles:How to get a number with the first zeroHow to upload a picture to a POS, multipart / form-data (android) serverWrite and read to file via pickleWhy doesn't imagecreatefromwebp understand a variable?Alignment of table column headers in the middleHow to set a fixed indent bottom 50px below the viewportFight against self-cleaning ViewModelWhat are the differences between the areas of “Information Security” and “Economic Information Security”? [closed]How to configure routing in express.js 4. +. +?Adding a record to the database [closed]All Articles