January 2019
Intermediate to advanced
384 pages
11h 50m
English
This is a convenience class using the QPainter interface internally. It can be used much in the style of a standard widget class, as can be seen in the following example:
class PaintedItemTriangle : public QQuickPaintedItem{public: void paint(QPainter* painter) { const QPolygonF polygon({ ... }); QBrush brush(Qt::yellow); painter->setBrush(brush); painter->drawPolygon(polygon); }};
This is very familiar and convenient, but it results in somehow not-so-amazing performance, as we will discuss in detail later in this chapter.
Read now
Unlock full access