Talk:Development/Tutorials/Graphics/Performance

From KDE TechBase

QPixmap vs. QImage

According to this comment from nezticle (Qt Company employee) on reddit.com/r/QtFramework, there isn't much of a difference between QImage and QPixmap when it comes to rendering since Qt 5:

So it may be important to point out, but in Qt 5 QPixmap is almost always a QImage. This was important in Qt 4 when we had multiple paint engines and then QPixmap was the "native" image format for the platform you were running on. There is only one case I can think of where QPixmap is not a QImage and that is when you are using the DirectFB platform plugin (which is probably busted at this point, and definitely legacy code). There QPixmap is a bona fide native surface (DFBSurface), but asside from that there is no real reason to use QPixmap over QImage in Qt 5, aside from signaling to the user of an API that they shouldn't modify the pixel data directly.

--Ndavis (talk) 14:04, 14 January 2024 (UTC)