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. [solved] Qml 'PathLine' - Controlling Spread of Elements
Forum Updated to NodeBB v4.3 + New Features

[solved] Qml 'PathLine' - Controlling Spread of Elements

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.1k 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.
  • V Offline
    V Offline
    Viilai
    wrote on last edited by
    #1

    Hi,

    I'm at my wit's end for how to control the spread of elements when using PathLine.

    At the moment everything is perfect except the overall spread is too large so elements are being cut off. Currently three elements are present on screen which is the intention.

    All I want to do is pull them in closer to each other.

    This is the code:
    (root is the initial Rectangle, root.width is the same size as the application's width so if full screen on a 1080p screen it will be 1920 (as in, 1920x1080))
    @path: Path {
    objectName: "path"
    startX: 0
    startY: 0
    PathLine { objectName: "pathLine"; x: appModel.count * root.width / 2; y: 0}
    }@

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      Try setting "pathItemCount":http://qt-project.org/doc/qt-5/qml-qtquick-pathview.html#pathItemCount-prop to a greater value.

      157

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Viilai
        wrote on last edited by
        #3

        thank you, I didn't even know the command existed :(

        Fixed :)

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          You're Welcome :)
          Please mark the post as solved by editing the post title and appending [solved].
          Happy Coding...

          157

          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