O'Reilly logo

Computer Vision with OpenCV 3 and Qt5 by Amin Ahmadi Tazehkandi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The QPainter class

The QPainter class can be used to draw (and basically paint) on any Qt class that is a subclass of the QPaintDevice class. What does that mean? It means basically anything including Qt widgets, that have a visual side and something can be drawn on them. So to name a few, QPainter can be used to draw on a QWidget class (which means basically all existing and custom made Qt widgets), QImage, QPixmap, and many other Qt classes. You can see the QPaintDevice class documentation page in Qt Creator Help mode for a full list of Qt classes that inherit QPaintDevice. QPainter has numerous functions, a lot of which have names starting with draw, and covering all of them would need a whole chapter by itself, but we are going to see ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required