Re: [SailfishDevel] Problem in interaction qml and c++

2020-04-23 Thread michael fuchs
Am 23.04.2020 11:39 schrieb David Llewellyn-Jones: https://gist.github.com/pazdera/1098119 Yeah, this looks like a decent example: clear and complete. As you can see from this, you essentially end up with a global object you can access from anywhere. The downside is that you only ever have

Re: [SailfishDevel] Problem in interaction qml and c++

2020-04-23 Thread David Llewellyn-Jones
On 23/04/2020 10:50, michael fuchs wrote: > Am 23.04.2020 08:59 schrieb David Llewellyn-Jones: >> On 23/04/2020 09:51, Michael Fuchs wrote: >>> How can AlbumList access mImgDB and mNetAccess? >>> >>> One solution could be to register the controller itself in qml and >>> then write >>> sth like

Re: [SailfishDevel] Problem in interaction qml and c++

2020-04-23 Thread julien . blanc
Your needs are very similar to mine in kontroller app( this is to be expected, needs are very similar).   At first glance, i tried an approach using singleton objects, and qml objects were internally just proxy over the c++ singletons. This proved to be a total mess, not reliable (including

Re: [SailfishDevel] Problem in interaction qml and c++

2020-04-23 Thread michael fuchs
Am 23.04.2020 08:59 schrieb David Llewellyn-Jones: On 23/04/2020 09:51, Michael Fuchs wrote: How can AlbumList access mImgDB and mNetAccess? One solution could be to register the controller itself in qml and then write sth like this in qml: AlbumList { imgDB: controller.imgDB

Re: [SailfishDevel] Problem in interaction qml and c++

2020-04-23 Thread David Llewellyn-Jones
On 23/04/2020 09:51, Michael Fuchs wrote: > How can AlbumList access mImgDB and mNetAccess? > > One solution could be to register the controller itself in qml and then write > sth like this in qml: > > > AlbumList { > imgDB: controller.imgDB > netAccess: controller.netAccess > } >