title: How can I reset the height of scrollbar in listview in QML
body: <p>I have create a listview with a custom scroll bar. In listview the image of scroll will be <strong>resized</strong> by the list container. The height of the scrollbar will be changed <strong>depend on the size of list data</strong>. In my case <strong>I want to show the original image</strong> which the height of the srollbar haven't be changed. Then print out the height data. Here is my code,</p>
  
  <pre><code>ScrollBar　{
      id: bar       
      implicitHeight: 780 //the size of the original image
      implicitWidth: 33
      contentItem: Image {
          id: sb
          source:"1.png"
      }       
  }
  Keys.onPressed: { console.log(bar.implicitWidth)}
  </code></pre>
  
  <p>I use the <strong>implicitHeight</strong> to reset the height. It can change the height. <strong>However</strong>, when I set it to 780(the height of the original image), the result show that the height is 560(the height depend on list data). I need to set implicitHeight to the value bigger than 780(like 1000, I don't know how to calculate the accurate value). Then the result of height will be showed to 780.Why?</p>
  
  <p>Then I tried this code,</p>
  
  <pre><code>ScrollBar　{
      id: ba     
      Component.onCompleted: console.log(bar.size)
      contentItem:
          Rectangle {
          implicitWidth: 780
          implicitHeight: 33
          Image {
          id: scrollBar
          source:"1.png"
          }
      }
  }
  </code></pre>
  
  <p>This time, the result show the height of 780! However, I <strong>cannot use id to access</strong> the implicitHeight, I don't know how to print out the height.</p>
  
  <p>So,my <strong>questions</strong> are</p>
  
  <ol>
  <li>What's the different between two cases? Why the height is not accurate in first case?</li>
  <li>If I use second method, how can I access(change) the height data by keyboard?</li>
  </ol>