What is the difference between QImage and QPixmap?

后端 未结 5 1921
暖寄归人
暖寄归人 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 18:49

    One important difference is that you cannot create or manipulate a QPixmap on anything but the main GUI thread. You can, however, create and manipulate QImage instances on background threads and then convert them after passing them back to the GUI thread.

提交回复
热议问题