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

    Hi
    I read the questions as to record
    QPainter drawing instructions and came to think of this
    http://doc.qt.io/qt-5/qpicture.html#details

    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
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.