Dynamically set anchors



  • i would like that when i drag object to main space in designer that anchors automatically set themselves. i dont see any function in childrenRect that i can use.

    Please help!

    Thank you.



  • Not only anchors. Margins to. I tried with anchors changes but something like doesn't work.
    @ states:

    State {
    name: "reanchored"

             AnchorChanges {
                 target: mainWindow.children
                 anchors.top: parent.top
                 anchors.bottom: parent.bottom
                 anchors.left: parent.left
                 anchors.right: parent.right
             }
    
         }
    

    @

    [Edit: Added @ tags -- mlong]


Log in to reply
 

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