Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Free 2D positioning of delegates

    QML and Qt Quick
    3
    4
    1276
    Loading More Posts
    • 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.
    • K
      kblue last edited by

      Hi all,
      I'm developing a qml application in which I have a fixed background and I need to place every model delegate (button) in its specific (x,y) position over the background.
      I tried with ListView and GridView but the result is that for example in a vertical ListView I can move the elements horizontally but not vertically.

      My question is if someone of you noticed this problem, and/or someone have a hint.

      Thanks in advance.
      Bye.

      1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators last edited by

        You can specify the direction using flickableDirection property.

        (Z(:^

        1 Reply Last reply Reply Quote 0
        • K
          kblue last edited by

          Thank you for the hint, but the problem is not the direction in which I can move elements, but the fixed position of them.
          Suppose I have a list a DataModel with four elements, in this case 4 buttons, and I want to place them in the four corners of the background Rectangle. With a ListView or a GridView I cannot do that...

          1 Reply Last reply Reply Quote 0
          • D
            dmcr last edited by

            Then perhaps you are not choosing the right Element.

            You can however use some model from any Listmodel (not associated to any Grid or ListView), and choose to place every element where you want.

            dmcr

            1 Reply Last reply Reply Quote 0
            • First post
              Last post