QPainter Vs QPaintDevice; which one to choose?
-
Hi All,
Hope you're doing well.
I was going through the book Fundamentals of Qt Programming where in Ch.6, it's written both QPainter and QPaintDevice can be used for painting. Apart from the difference in member functions of these classes, is there any difference in the performance of the objects of these classes?
Thanks
-
Hi All,
Hope you're doing well.
I was going through the book Fundamentals of Qt Programming where in Ch.6, it's written both QPainter and QPaintDevice can be used for painting. Apart from the difference in member functions of these classes, is there any difference in the performance of the objects of these classes?
Thanks
@Swati777999 What you point out is wrong. QPaintDevice is a class that is painted using QPainter, and from that class QWidget, QImage, QPixmap, etc. inherit.
Please read the docs: https://doc.qt.io/qt-5/qpaintdevice.html