April 2018
Beginner
714 pages
18h 21m
English
Once you have the painter properly set, you can start issuing painting operations. QPainter has a rich set of operations for drawing different kinds of primitives. All of these operations have the draw prefix in their names, followed by the name of the primitive that is to be drawn. Thus, operations such as drawLine, drawRoundedRect, and drawText are available with a number of overloads that usually allow us to express coordinates using different data types. These may be pure values (either integer or real), Qt's classes, such as QPoint and QRect, or their floating point equivalents—QPointF and QRectF. Each operation is performed using current painter settings (font, pen, and brush).
Read now
Unlock full access