Does this example work for you:
import QtQuick 2.0
import QtQuick.Controls 1.2
import Felgo 3.0
App {
NavigationStack {
Page {
id: page
title: "AppFlickable"
AppFlickable {
id: flick
anchors.fill: parent // The AppFlickable fills the whole page
contentWidth: contentColumn.width // You need to define the size of your content item
contentHeight: contentColumn.height
// Using a Column as content item is very convenient
// The height of the column is set automatically depending on the child items
Column {
id: contentColumn
width: page.width // We only need to set the width of a column
// We use a repeater to create 4 colored Rectangles
Repeater {
// We use a simple array of colors as model
model: ["#eee","#ddd","#ccc","#bbb"]
Rectangle {
color: modelData // This will be "red", "green", ...
width: parent.width
height: dp(200)
}
}
}
}
ScrollIndicator {
flickable: flick
}
}
}
}
Your error log output would make sense if you had e.g. import QtQuickControls 2.2, as there is also a ScrollIndicator type with a different API in this module. In such cases you can use a namespace to resolve the conflict, like this:
import QtQuick 2.0
import QtQuick.Controls 1.2
import Felgo 3.0
// if you dont specify a namespace with "as", this causes your error
import QtQuick.Controls 2.2 as QQC2
App {
NavigationStack {
Page {
id: page
title: "AppFlickable"
AppFlickable {
id: flick
anchors.fill: parent // The AppFlickable fills the whole page
contentWidth: contentColumn.width // You need to define the size of your content item
contentHeight: contentColumn.height
// Using a Column as content item is very convenient
// The height of the column is set automatically depending on the child items
Column {
id: contentColumn
width: page.width // We only need to set the width of a column
// We use a repeater to create 4 colored Rectangles
Repeater {
// We use a simple array of colors as model
model: ["#eee","#ddd","#ccc","#bbb"]
Rectangle {
color: modelData // This will be "red", "green", ...
width: parent.width
height: dp(200)
// We use the namespace QQC2 now to use the Button from the right module
QQC2.Button {
anchors.centerIn: parent
text: "Qt Quick Controls 2 Button"
}
}
}
}
}
ScrollIndicator {
flickable: flick
}
}
}
}
Does this help in your case?
Cheers,
Alex