How to use C++ Painter component on ListView and make it visible.
-
I have declared Line component for using in QML. but when I use it on ListView it not visible.
this is code:
@
import QtQuick 1.0
import DrawLine 1.0Rectangle { id: page
width: 400; height: 300
color: "#4d4d4d"ListView { id: lineList anchors.fill: parent; model: lineModel delegate: Component { Item { DrawLine { // this line is not visible name: "testInList"; x1:x1; y1:y1; x2:x2; y2:y2; color: "red" } Text { // this text is visible text: txt } } } ListModel { id: lineModel ListElement { x1:0; y1:50; x2:800; y2:800; txt:"hello" } } } DrawLine { name: "testOutList"; x1:0; y1:0; x2:1200; y2:800; color: "red" ; } // this line is visible
}@
How to make it visible ?
Thanks.
-
Apologize with that. I'll stick to a single forum when I post next questions.