Center of a Shape with SvgPath

  • Hi all,

    I am looking at the recent Shape features in QML.
    What i would like to do is to build a shape from an svg path, which was very easy by using

    Shape {
        id: demo1
        ShapePath {
                    PathSvg { path: "L 150 50 L 100 150 z" }

    Now the question is:
    Q1. How can I get the height, width of this shape from within QML?
    They return zero.

    Q2. I check if a point falls within this Shape from QML?

    When calling the following from an appropriate handler,


    it returns false. But the point is in the triangular region therefore it should have returned true.

    Thanks in advance for any upcoming answers..

  • Hi,

    did you solve your issue? I'm facing a similar situation and I've posted a new thread.

    Thanks, cheers


Log in to reply