Problem with itemAt function in repeater element



  • I have the following QML file:

    @import QtQuick 1.0

    (...) // non-relevant Code

    Repeater {
    id: livesRepeater
    model: 3

    Image {
    source: "images/love.png"
    height: parent.height
    width: height

    Behavior on opacity {
    NumberAnimation {
    duration: 250
    }
    }
    }
    }

    function fillLives() {
    for (var i=0; i<livesRepeater.count; i++) {
    livesRepeater.itemAt(i).opacity = 1
    }
    }
    @

    And in the fillLives function, I'm getting the following error "TypeError: Result of expression 'livesRepeater.itemAt' [undefined] is not a function."

    However, this only happens when I test the app in Symbian^1 devices, in Symbian^3 works without problems.

    Anyone knows why? Is there some alternative to do it in Symbian^1?



  • Hi,

    "itemAt":http://qt-project.org/doc/qt-4.8/qml-repeater.html#itemAt-method was added in QtQuick 1.1 so it won't work on devices with Symbian^1 because the newest version of Qt libs possible to install on those devices is Qt 4.7.3 with QtQuick 1.0.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.