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. Creating dashed lines

Creating dashed lines

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 3.7k 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.
  • E Offline
    E Offline
    EJ180
    wrote on last edited by
    #1

    I am totally new to qt and qml. Can someone please tell me how to make the border have dashed lines to this preexisting code. Thank you

    }
    // Trial border
    Rectangle {
    id: veritcalGuide
    width: 34
    height: parent.height
    opacity: 0.8
    color: "Transparent"
    border.color: "#a0a0a0"
    enabled: false
    antialiasing: true
    anchors.centerIn: parent
    }

    1 Reply Last reply
    0
    • MarkkyboyM Offline
      MarkkyboyM Offline
      Markkyboy
      wrote on last edited by
      #2

      You cannot use/add dashed lines on Rectangle, you need to use Shape or Canvas to create the shape then you can choose to have solid or dashed lines.

      https://doc.qt.io/qt-5/qml-qtquick-shapes-shape.html

      Canvas example; https://forum.qt.io/topic/59139/dotted-lines-in-qml/5

      Don't just sit there standing around, pick up a shovel and sweep up!

      I live by the sea, not in it.

      1 Reply Last reply
      0
      • E Offline
        E Offline
        EJ180
        wrote on last edited by
        #3

        Ill give it a try. Thanks!

        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