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. Dynamically set anchors
Qt 6.11 is out! See what's new in the release blog

Dynamically set anchors

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

    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.

    1 Reply Last reply
    0
    • E Offline
      E Offline
      Eraserhead
      wrote on last edited by
      #2

      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]

      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