title: qml flickable canvas load content doesn't resize and cannot flick
body: <p>I have a <code>Flickable</code> with a child <code>Canvas</code> and <code>Image</code>. I am loading an image into the <code>source</code> of the <code>Image</code> on a button click. That all works.
  The issue is the flickable doesn't refresh its dimensions to that of the image so that the whole image is "flickable" and I can scroll around it (it's bigger than the viewable window). However it does refresh if I resize the window and I can then flick around the image.</p>
  
  <p>I guess this is because the window is being redrawn and qml is re-reading the <code>img.width</code> and <code>img.height</code> values to redraw the <code>Flickable</code>.</p>
  
  <p>(FYI if I load an image in when I start the app, Flickable works as expected, it's only when I load an image on a button click, once the app is running that the window needs redrawing (or resizing) to get the <code>Flickable</code> to work as expected</p>
  
  <pre><code>Flickable {
      id: flickableCanvas
      anchors.fill: parent
      Item {
          id: source
          width: Math.max(parent.width,img.width)
          height: Math.max(parent.height,img.height)
      Image
      {
          id: img
      }
      Canvas {
          id: myCanvas
          }
      }
  }
  
  Connections {
      target: QmlBridge
      onLoadImage: {
          img.source = p
          myCanvas.requestPaint()
          flickableCanvas.contentWidth = img.width
          flickableCanvas.contentHeight = img.height
      }
  
  }
  </code></pre>