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. Restore anchors.verticalCenter
Forum Updated to NodeBB v4.3 + New Features

Restore anchors.verticalCenter

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 4 Posters 5.2k 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.
  • I Offline
    I Offline
    Iktwo
    wrote on last edited by
    #1

    Hi, I'm rotating elements in my app, I set
    @PropertyChanges { target: txtOrg; anchors.verticalCenter: btn0.verticalCenter }@

    when in Landscape, it center my component txtOrg, but when I rotate to portrait btn0 it's not next to txtOrg, so I have to clear the anchor and let it rellocate, I use this for portrait

    @PropertyChanges { target: txtOrg; anchors.verticalCenter: undefined}@

    but when I try to do it, it doesn't return to the original state and I get the output @QML TextArea: Cannot anchor to a null item.@

    Thanks!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbrasser
      wrote on last edited by
      #2

      Hi,

      I'd suggest trying AnchorChanges rather than PropertyChanges, to see if that fixes the issue for you.

      Regards,
      Michael

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Iktwo
        wrote on last edited by
        #3

        Thanks! it works now

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qwasder
          wrote on last edited by
          #4

          [quote author="mbrasser" date="1319000932"]Hi,

          I'd suggest trying AnchorChanges rather than PropertyChanges, to see if that fixes the issue for you.

          Regards,
          Michael[/quote]

          Helped me too, thanks a bunch! :)

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            qwasder
            wrote on last edited by
            #5

            [quote author="mbrasser" date="1319000932"]Hi,

            I'd suggest trying AnchorChanges rather than PropertyChanges, to see if that fixes the issue for you.

            Regards,
            Michael[/quote]

            Helped me too, thanks a bunch! :)

            1 Reply Last reply
            0
            • F Offline
              F Offline
              frankem
              wrote on last edited by
              #6

              Awesome. Thanks for the hint!

              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