문제

is QImage based on QSharedData ? Do Qimage follow pimpl or copy on write ? e.g. would copying(through copy con or assignment) an Qimage make a deep copy of pixels ?

도움이 되었습니까?

해결책

QImage is copy on write. It will not copy pixels until you start modifying it.

For what it's worth when passing it into functions, I always use const QImage & anyway not to freak anyone out.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top