Hi Michael & devel list Thanks for the link, I did a bit of googling before asking but didnt remember to check the source code.Still dont know why it worked for desktop and android, but now it's bullet proof for all plataforms :) Solved!!! CheersJoão
Em segunda-feira, 14 de maio de 2018 14:21:38 GMT+1, Michael Fuchs <mic...@gmx.at> escreveu: Hi Joao, https://github.com/qt/qtdeclarative/blob/44a89492b49f23a975377795dbb7a48916cb5081/src/qml/types/qqmllistmodel.cpp#L2739 "Values must be simple constants; either strings (quoted and optionally within a call to QT_TR_NOOP), boolean values (true, false), numbers, or enumeration values (such as AlignText.AlignHCenter)." ...so I rather wonder, why it works on Android. ;) br, Michael. Am 14.05.2018 um 00:45 schrieb joao morgado via Devel: > Hi there > > I tried to save a point type in a listmodel but when reading the value > from the list I get a error saying something like "undefined". This > error happens in my intex aqua fish. > It does work on desktop and android. > > My code is something like this: > > ListModel{ > > id:obstaclesList > > //obstaclesarerectanglesthatcannotbetransposed,likewallsforexample > > //listhetopleftcoordinate > > //risthebottomrightcoordinate > > } > > > functionaddObstacle(l,r){ > > //console.log("addingobstaclestolist") > > obstaclesList.append({"l":l,"r":r}) > > } > > > functionclearObstacles(){ > > obstaclesList.clear() > > } > > > functiongetObstacle(i){ > > returnobstaclesList.get(i) > > } > > > ...... > > obstaclesList.addObstacle(mountain.baseTL,mountain.baseBR) // baseTL and > baseBR are Qt.point(....) > > > .... > > obstaclesList.getObstacle(i).l // <- this line is where it fails > > > I solve this problem by changing the code to add / get real types > instead of point. > Just curious why this happen, inititally I tought it could be some arm > limitation, but it does work good on a android mobile phone. Any ideias ? > > Br > João > > > _______________________________________________ > SailfishOS.org Devel mailing list > To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org > _______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org
_______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org