CustomItem.qml Example File
pageddatamodel/assets/CustomItem.qml
import bb.cascades 1.0
Container {
id: root
property alias text: label.text
property bool selected: false
layout: DockLayout {}
ImageView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
imageSource: root.selected ? "asset:///images/item_selected.png" : "asset:///images/item_normal.png"
}
Label {
id: label
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Center
textStyle {
base: SystemDefaults.TextStyles.TitleText
color: Color.Black
}
}
}