Listview onclick event
-
I have a listview with 5 items, onclicking them results in a rectangle with their properties. The starting point of the rectange is just beside the list. For instance if i clickon 5th element the rectangle is half sunk, as my width and height is limited. I want tat rectangle to start at a higher position: i tried to give x,y values but this does not work. I hope you have got my quesiton. If details are required, I will be more than happy to give them
Thanks in advance
-
@// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1Rectangle {
id:main
width: 360
height: 360Component { id:contactdelegate Item { x: 5 height: 40 Row { id: row1 spacing: 10 Rectangle { width: 40 height: 40 color: colorCode } Text { text: name anchors.verticalCenter: parent.verticalCenter font.bold: true } } Text{ id:t1 text :"HELLO" }
}
}ListModel { id:listmodel ListElement { name: "Grey" colorCode: "grey" } ListElement { name: "Red" colorCode: "red" } ListElement { name: "Blue" colorCode: "blue" } ListElement { name: "Green" colorCode: "green" } } ListView { id: list_view1 x: 27 y: 62 clip:true width: 110 height: 160 delegate: contactdelegate model: listmodel }
}
@Is it possible for me to have the text "Hello" at the beginning of the main reactange at x,y:0 position??
Thanks in advance!