Hi,
On Fri, Mar 8, 2013 at 1:41 AM, Steve Pavao <[email protected]> wrote:
> The problem I am having is that I haven't found a reliable way to be able to
> set the
> associated text delegate's font.bold and font.pixelSize properties once I set
> the
> ListView's currentIndex to that desired value
> programatically. (I want the text for the item at the currentIndex to show
> in bold
> and at a larger pixelSize).
Doesn't this pattern work for you?
import QtQuick 1.1
Rectangle {
width: 360
height: 360
ListView {
anchors.fill: parent
model: 10
delegate: Text {
id: delegate
font.bold: model.index === delegate.ListView.view.currentIndex
font.pixelSize: model.index ===
delegate.ListView.view.currentIndex ? 20 : 16
text: modelData
MouseArea {
anchors.fill: parent
onClicked: delegate.ListView.view.currentIndex = model.index
}
}
}
}
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest