Important: Please read the Qt Code of Conduct -

QPainterPath doesn't store QRect information?

  • I was hoping to have some kind of container that can hold all the painted items and QPainterPath looked like a good choice, but it doesn't have any way to get width and height information for a QRect that was drawn. Also does contains() actually get the image or canvas or an item shape that is drawn is within those coordinates? It seems that contains() actually is just the image/canvas?

    Any way to access the actual object that was drawn? Like in the form QRect without a redeclaration?

  • Lifetime Qt Champion

    I read the questions as to record
    QPainter drawing instructions and came to think of this

    QPainterPath is for drawing various paths (shapes) and might be what you need if you are drawing just paths but if you mean other types of drawing/images etc than
    have a look at QPicture.

Log in to reply