Re: [SailfishDevel] Sharing model between pages ("by reference")

2015-02-01 Thread Krisztian Olah
Hi Dirk, perhaps what you really want to do is filter the data through 1or 2 proxy models, that way you get 2 different models whilst still using the same source model. When data changes in the source it notifies the proxies as well of the change and both views update. Otherwise, if it is not w

Re: [SailfishDevel] Sharing model between pages ("by reference")

2015-02-01 Thread Dirk Zimmermann
On 01.02.2015 11:19, Andrey Kozhevnikov wrote: > Why didn't you tried before asking? This is working in exactly same way > as you described in your question. I asked because in my case it didn't work. Otherwise there wouldn't have been a reason to ask :) > Below is template pages. MainPage declar

Re: [SailfishDevel] Sharing model between pages ("by reference")

2015-02-01 Thread Andrey Kozhevnikov
Hello, Why didn't you tried before asking? This is working in exactly same way as you described in your question. Below is template pages. MainPage declares testModel, FirstPage and SecondPage using same model as reference, assigned to listModel property. Everything works flawlessly. MainP

[SailfishDevel] Sharing model between pages ("by reference")

2015-02-01 Thread Dirk Zimmermann
Hi, I have a page with an attached page. Currently, they get pushed on the stack by a parent page like this: pageStack.push(Qt.resolvedUrl("Page1.qml"), lightModel) pageStack.pushAttached(Qt.resolvedUrl("Page2.qml"), lightModel) Page1.qml will then refresh its copy with live data. I would rather