Hi!
Could someone reproduce the issue below? If yes, I´ll file it as bug.
But there is still a (very good) chance, that I´m simply doing something
wrong.
Thanks!
Conny
Am 21.08.2010 15:51, schrieb Cornelius Hald:
> Hi,
>
> I'm having trouble with a ListView in combination with a
> VisualItemModel. It behaves as expected, if I use the mouse to flick
> between the ListView items. But if I change the current item using code,
> the next item is not visible during the animation.
>
> If I remember correctly I've already used the ListView with a ListModel
> and XmlListModel without having this problem.
>
> In the following example code there is a orange and a green rectangle on
> gray background. You can flick horizontally to switch between them. If
> you click the black rectangle at the bottom, the same should happen, but
> it looks different.
>
> Before filing this as a bug it would be nice if you could check that the
> code is actually ok. Also it would be nice if you could see if the
> example works for you. Maybe it's a local problem only.
>
> -----------------------------
> import Qt 4.7
>
> Rectangle {
> color: "gray"
> width: 800
> height: 480
>
> VisualItemModel {
> id: itemModel
> Rectangle {
> width: 800
> height: 480
> color: "orange"
> }
> Rectangle {
> width: 800
> height: 480
> color: "green"
> }
> }
>
> ListView {
> id: listView
> model: itemModel
> orientation: ListView.Horizontal
> anchors.fill: parent
> }
>
> Rectangle {
> width: 50
> height: 50
> color: "black"
> anchors.bottom: parent.bottom
> anchors.horizontalCenter: parent.horizontalCenter
> MouseArea {
> anchors.fill: parent
> onClicked: {
> listView.currentIndex == 0
> ? listView.currentIndex = 1
> : listView.currentIndex = 0;
> }
> }
> }
> }
> -----------------------------
>
> Thanks!
> Conny
>
>
>
> _______________________________________________
> Qt-qml mailing list
> [email protected]
> http://lists.trolltech.com/mailman/listinfo/qt-qml
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-qml