Re: [Interest] DelegateModel: Dynamic Delegate Model groups

2016-07-29 Thread Jason H
t 12:02 PM From: "Jason H" To: "Jérôme Godbout" Cc: "Interests Qt" Subject: Re: [Interest] DelegateModel: Dynamic Delegate Model groups Thanks Jerome! I'm making progress, but not quite there.   I've got it creating the list with the correct types now, b

Re: [Interest] DelegateModel: Dynamic Delegate Model groups

2016-07-27 Thread Jason H
"André Somers" , "Interests Qt" Subject: Re: [Interest] DelegateModel: Dynamic Delegate Model groups The way you create the object seem to be all fine. It's the container of multiple obj that may have a problem with it.   When you specify a QQmlListProperty you cannot assign

Re: [Interest] DelegateModel: Dynamic Delegate Model groups

2016-07-27 Thread Jérôme Godbout
t; *Sent:* Tuesday, July 26, 2016 at 1:43 PM > > *From:* "Jérôme Godbout" > *To:* "Jason H" > *Cc:* "André Somers" , "Interests Qt" < > interest@qt-project.org> > *Subject:* Re: [Interest] DelegateModel: Dynamic Delegate Model g

Re: [Interest] DelegateModel: Dynamic Delegate Model groups

2016-07-26 Thread Jason H
expect Qt to internally try to promote it and succeed. Sent: Tuesday, July 26, 2016 at 1:43 PM From: "Jérôme Godbout" To: "Jason H" Cc: "André Somers" , "Interests Qt" Subject: Re: [Interest] DelegateModel: Dynamic Delegate Model groups Just to make

Re: [Interest] DelegateModel: Dynamic Delegate Model groups

2016-07-26 Thread Jérôme Godbout
* "André Somers" , "Interests Qt" < > interest@qt-project.org> > *Subject:* Re: [Interest] DelegateModel: Dynamic Delegate Model groups > QQmlListProperty<> cannot be assign with another QQmlListProperty<> or a > QList<>, but it does support ja

Re: [Interest] DelegateModel: Dynamic Delegate Model groups

2016-07-26 Thread Jason H
r way? Or the QQmlListProperty is too tightly typed?     Sent: Tuesday, July 26, 2016 at 11:49 AM From: "Jérôme Godbout" To: "Jason H" Cc: "André Somers" , "Interests Qt" Subject: Re: [Interest] DelegateModel: Dynamic Delegate Model groups QQm

Re: [Interest] DelegateModel: Dynamic Delegate Model groups

2016-07-26 Thread Jérôme Godbout
QQmlListProperty<> cannot be assign with another QQmlListProperty<> or a QList<>, but it does support javascript Array. I myself made a simple function to convert: function adaptQQLP(list_obj) { return [].concat(list_obj); } It does iterate on it and create a javascript array which is enough M

Re: [Interest] DelegateModel: Dynamic Delegate Model groups

2016-07-26 Thread Jason H
> I'd just write my proxy model in C++ and be done with it. > > André > > > Op 26/07/2016 om 15:46 schreef Jason H: > > I want to have groups corresponding to the equivalent of 'SELECT DISTINCT > > x' query. Then I want each item assigned to a group of it's value of x. For > > example: > > 'SE

Re: [Interest] DelegateModel: Dynamic Delegate Model groups

2016-07-26 Thread André Somers
I'd just write my proxy model in C++ and be done with it. André Op 26/07/2016 om 15:46 schreef Jason H: I want to have groups corresponding to the equivalent of 'SELECT DISTINCT x' query. Then I want each item assigned to a group of it's value of x. For example: 'SELECT DISTINCT x' -> ['a',

[Interest] DelegateModel: Dynamic Delegate Model groups

2016-07-26 Thread Jason H
I want to have groups corresponding to the equivalent of 'SELECT DISTINCT x' query. Then I want each item assigned to a group of it's value of x. For example: 'SELECT DISTINCT x' -> ['a', 'b', 'c'] 'SELECT x,y' -> [ ['a', '1'], ['a','2'], ['b','3'], ['c', '4'], ['c','11'] ] Then I have 3 groups: