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. Free 2D positioning of delegates
QtWS25 Last Chance

Free 2D positioning of delegates

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 1.5k 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.
  • K Offline
    K Offline
    kblue
    wrote on last edited by
    #1

    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
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You can specify the direction using flickableDirection property.

      (Z(:^

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kblue
        wrote on last edited by
        #3

        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
        0
        • D Offline
          D Offline
          dmcr
          wrote on last edited by
          #4

          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
          0

          • Login

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