Re: [Interest] Can't JSON.stringify an object in QML

2021-06-01 Thread Tony Rietwyk
HI Jason, I'm pretty sure this is NOT valid JSON: {"that": "other": {} } Either the value and comma for "that" is missing, or "other": {} should be encapsulated as an object in braces as the value of "that". Regards, Tony On 2/06/2021 12:29 am, Jason H wrote: Some JSON serialisers

Re: [Interest] QML defining an object property

2021-06-01 Thread Pierre-Yves Siret
Le lun. 31 mai 2021 à 19:59, Alexander Dyagilev a écrit : > Hello, > > Am I right that this is not possible in QML? > > readonly property var mainTbImg: { > up: "some string", > up_check: "some another string" > } > The problem is that QML doesn't know how to parse it, it can't know

Re: [Interest] Can't JSON.stringify an object in QML

2021-06-01 Thread Jason H
> Some JSON serialisers replace that with null nowadays. > > I guess you could write some code to test whether it’s cyclical > and at which elements it recurses. If you feel not up to it, > write back and I’ll try (ECMAscript is not a language I feel > comfortable in either but I think I could

Re: [Interest] Can't JSON.stringify an object in QML

2021-06-01 Thread Thorsten Glaser
On Tue, 1 Jun 2021, Jason H wrote: > > Well, if it were cyclical (I really don't think it is), I would expect that > the line: > return QJsonDocument::fromVariant(v).toJson(QJsonDocument::Compact); > > Would never return. No, error-tolerant behaviour just returns null in the place where the

Re: [Interest] [Development] Multi-Selection behavior of item views breaks drag'n'drop UX - options

2021-06-01 Thread Volker Hilsheimer
But git history will remember the fool that broke all the things :P Anyway, a bunch of patches in the chain currently ending at https://codereview.qt-project.org/c/qt/qtbase/+/351595/3 in case anyone wants to give it a swing. MultiSelection is not changed yet, and it looks like we might get