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. Unbind properties in state
Qt 6.11 is out! See what's new in the release blog

Unbind properties in state

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

    Hi,

    I'm pretty new to Qt and just looking into QtQuick/QML, so sorry if this is a stupid question.

    I've just been learning about states and the PropertyChange item. I was wondering if properties can be 'unbound' within a PropertyChange. I was specifically thinking about changing anchors, where I would want to remove an anchor setup in another state and then setup a different one. Is such a thing possible?

    Thanks for any help.

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

      For manipulating the anchors you can use the AnchorChanges element just like you would use PropertyChanges with other types of properties. To 'undo' an anchor you can set the anchor line to "undefined". http://doc.qt.digia.com/qt/qml-anchorchanges.html

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sizanical_bill
        wrote on last edited by
        #3

        Cheers! That's the page of documentation I hadn't found yet :)

        Thanks for your help.

        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