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. how is this not a binding loop?
Forum Updated to NodeBB v4.3 + New Features

how is this not a binding loop?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 251 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    Hi all -

    I was playing with one of the examples (Qt Quick Controls - Gallery), and came across this bit of code:

    Flickable {
        id: flickable
        contentHeight: pane.height
    
        Pane {
            id: pane
            height: flickable.height * 1.25
    

    How is this not a binding loop?

    Thanks...

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2

      @mzimmers said in how is this not a binding loop?:

      binding loop

      you read here
      https://doc.qt.io/qt-5/qml-qtquick-flickable.html#contentHeight-prop
      flickable.height and flickable.contentHeight are two different things. flickable.contentHeight does not affect flickable.height.

      mzimmersM 1 Reply Last reply
      2
      • JoeCFDJ JoeCFD

        @mzimmers said in how is this not a binding loop?:

        binding loop

        you read here
        https://doc.qt.io/qt-5/qml-qtquick-flickable.html#contentHeight-prop
        flickable.height and flickable.contentHeight are two different things. flickable.contentHeight does not affect flickable.height.

        mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #3

        @JoeCFD yeah, I did read that, but I didn't understand it at first. I guess the purpose of a Flickable is more to accept user input than to control the display of its contents?

        As I mentioned in another thread, I'm still not able to get my Flickable's ScrollBar working, and I thought it might be related to this, but...now I guess not.

        Thanks...

        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