Got it to work.
Only had to do this:
@
//Screenshot button
RectangularButton{
id: screenshotButton
text: "Screenshot"
anchors.bottom: parent.bottom
anchors.right: savePictureButton.left
anchors.margins: 10
onClicked: {
//Take screenshot of the image
flick.grabToImage(function(result) {
snapController.url = result.url
}, Qt.size(snapshotViewItem.width,snapshotViewItem.height));
//Update zoom and update image to save
flick.contentHeight = flick.height
flick.contentWidth = flick.width
}
}
@