Ah! Thank you, exactly what I was looking for! Best regards, Ola
(Sendt fra mobiltelefon) > Den 28. sep. 2013 kl. 16:47 skrev Дмитрий Козлов <gni...@mail.ru>: > > 27.09.2013 17:22, Ola Røer Thorsen пишет: >> Hi, >> >> I have a c++ list model that inherits QAbstractListModel. It contains a list >> of waypoints that amongst other things have x,y screen coordinates. Points >> are added, removed and values are changed runtime. >> >> I want to visualize these in Quick2 on top of a map image. I need to create >> Quick Items mapped to the items in the list model, bind properties, and >> remove the items when they are removed from the list. Similar to a ListView, >> just more for displaying something on a map. Any hints on how to do this? >> >> >> >> >> You can add "itemX", "itemY" roles to C++ list model items and then use them >> in QtQuick Repeater's delegate. >> Something like this: >> >> Image { >> id: map >> } >> >> Repeater { >> anchors.fill: map >> model: myModel >> delegate: Rectangle { >> x: itemX >> y: itemY > >> } >> } >> >> _______________________________________________ >> Interest mailing list >> Interest@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest