Free 2D positioning of delegates



  • 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.


  • Moderators

    You can specify the direction using flickableDirection property.



  • 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...



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.