ボタン付きのリスト ビューがありますが、qml blackberry 10 のボタンのクリック イベントをトリガーできませんか? 誰でもこの点について私を助けてくれますか、
ListView {
verticalAlignment: VerticalAlignment.Center
horizontalAlignment: HorizontalAlignment.Center
layout: FlowListLayout {
}
dataModel: mydatamodel
listItemComponents: [
ListItemComponent {
type: "item"
Container {
layout: DockLayout {
}
Button {
id: samplebutton
text: "Button"
horizontalAlignment: HorizontalAlignment.Right
onClicked: {
//click event not fired here..
}
}
Label {
horizontalAlignment: HorizontalAlignment.Left
text: "Sample Label"
}
Divider {
horizontalAlignment: HorizontalAlignment.Fill
}
}
}
]
onTriggered: {
var selectedItem = dataModel.data(indexPath);
}
}