Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Scalable graphics with Shape
Forum Updated to NodeBB v4.3 + New Features

Scalable graphics with Shape

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 180 Views
  • 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.
  • S Offline
    S Offline
    stabbles
    wrote on last edited by
    #1

    Hi all,

    How would I efficiently draw a path in a Shape with coordinates relative to the size of the Shape? Of course I could do something like:

    Shape {
        id: wrap
        anchors.fill: parent
        ShapePath {
            strokeColor: "red"
            strokeWidth: 10
            startX: .2 * wrap.width; startY: .3 * wrap.height
            PathLine { x: .3 * wrap.width; y: .5 * wrap.height}
            PathLine { x: .1 * wrap.width; y: .4 * wrap.height}
            PathLine { x: .2 * wrap.width; y: .1 * wrap.height}
        }
    }
    

    but this feels like a cumbersome API with a lot of redundant bindings (one should be enough, right?)

    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