can anyone tell me how can i select(highlited) an item on click in listviewmodel
ref how can i use highlightFollowsCurrentItem.....etc
can anyone tell me how can i select(highlited) an item on click in listviewmodel
ref how can i use highlightFollowsCurrentItem.....etc
Are you saying something like this:
http://kunalmaemo.blogspot.com/2011/...legate-in.html
thank sir replying i want same like this but in this code as mention "Please note that in above code, highlight only moves when you click button or you use keyboard arrow key.
but in my case i want simply onclicked listview item should be highlited no button there will b .i want for nokia n950
thanks advance
You can define a state in delegate and can change the color.
e.g.
MouseArea {
id: mouseArea
anchors.fill: parent
onClicked: {
}
}
states: [
State {
name: "selected"
when: mouseArea.pressed
PropertyChanges {target: delegateRectangle; color: "red";}
}
]
Use Qt-Quick to make your application UI more attractive.
http://store.ovi.com/content/271896 | http://store.ovi.com/content/276199 | http://store.ovi.com/content/276202 | http://store.ovi.com/content/280827
Well there the button means the circular icon which in different color on extreme right of listitem.You can put the highlight code in the MouseArea for listitem:
MouseArea {
id: itemMouseArea
anchors.fill: parent
onClicked:
{
//highlight code
}
}
sir vineet i tried this ...but the problem is it highted all the clicked item ..but i want only one ..other will b on their original color
thanxk plz dont mind i m v new in qml
The mouse area should be within the Row/column inside which the listitem is defined, for e.g. :
Code:Row { id: topLayout x: somevalue; y: somevalue; height: somevalue; width: parent.width Text { id: textid } MouseArea { } }
thank u sir i have done thankx a lot
at the end your first link help my
http://kunalmaemo.blogspot.com/2011/...legate-in.html
![]()
:P