I'm trying to call a function which is defined inside a Flickable element, but it seems impossible to access it by id. The following code produces ReferenceError: flickable is not defined
when tab.getValues()
is called:
import QtQuick 2.4
Tab {
id: tab
function getValues() {
flickable.getValues()
}
Flickable {
id: flickable
clip: true
flickableDirection: Flickable.VerticalFlick
contentHeight: column.height
topMargin: 2 * pxPermm
function getValues() {
console.log("flickable.getValues() called")
}
Column {
id: column
// some content
}
}
}
How else am I supposed to access the Flickable element? The function getValues() must be placed inside the Flickable because it needs to access elements placed inside the column.