on xenial help sign in
fix clicked
c461eb3Albert Astals
qml/Dash/CardFilterGrid.qml+2−2
@@ -49,10 +49,10 @@ DashRenderer {
49 width: filterGrid.cellWidth
49 width: filterGrid.cellWidth
50 height: filterGrid.cellHeight
50 height: filterGrid.cellHeight
51 Loader {
51 Loader {
52+ id: loader
52 sourceComponent: cardTool.cardComponent
53 sourceComponent: cardTool.cardComponent
53 anchors.horizontalCenter: parent.horizontalCenter
54 anchors.horizontalCenter: parent.horizontalCenter
54 onLoaded: {
55 onLoaded: {
55−// console.log("CardFilterGrid onLoaded", cardTool.artShapeSize, cardTool.cardWidth);
56 item.objectName = "delegate" + index;
56 item.objectName = "delegate" + index;
57 item.width = Qt.binding(function() { return cardTool.cardWidth; });
57 item.width = Qt.binding(function() { return cardTool.cardWidth; });
58 item.height = Qt.binding(function() { return cardTool.cardHeight; });
58 item.height = Qt.binding(function() { return cardTool.cardHeight; });
@@ -63,7 +63,7 @@ DashRenderer {
63 item.headerAlignment = Qt.binding(function() { return cardTool.headerAlignment; });
63 item.headerAlignment = Qt.binding(function() { return cardTool.headerAlignment; });
64 }
64 }
65 Connections {
65 Connections {
66− target: item
66+ target: loader.item
67 onClicked: genericFilterGrid.clicked(index, item.y)
67 onClicked: genericFilterGrid.clicked(index, item.y)
68 onPressAndHold: genericFilterGrid.pressAndHold(index, item.y)
68 onPressAndHold: genericFilterGrid.pressAndHold(index, item.y)
69 }
69 }