What is the difference between QImage and QPixmap?

后端 未结 5 1917
暖寄归人
暖寄归人 2020-12-07 18:18

I do not understand what is the difference between QImage and QPixmap, they seem to offer the same functionality. When should I use a QImage and when should I use a QPixmap?

5条回答
  •  不思量自难忘°
    2020-12-07 19:01

    Important in industrial environments:

    The QPixmap is stored on the video card doing the display. Not the QImage.

    So if you have a server running the application, and a client station doing the display, it is very significant in term of network usage.

    With a Pixmap, a Redraw consists in sending only the order to redraw (a few bytes) over the network.

    With a QImage, it consists in sending the whole image (around a few MB).

提交回复
热议问题