Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Center of a Shape with SvgPath

Center of a Shape with SvgPath

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 564 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mcku
    wrote on last edited by
    #1

    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,

         demo1.contains(Qt.point(100,100))
    

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

    Thanks in advance for any upcoming answers..

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MrRaffa
      wrote on last edited by
      #2

      Hi,

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

      Thanks, cheers

      Raffaele

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved