[Interest] [EXTERNAL] Re: Send Data to JavaScript
Jérôme Godbout
godboutj at amotus.ca
Wed Apr 14 16:15:05 CEST 2021
Yeah that would be a pain, but if it work you can try to reduce the QVariant usage to a minimum from that point.
1. QVariantMap
2. QMap<QVariant, QVariant>
3. QMap<QString, QVariant>
4. QMap<QString, QVariantList>
5. QMap<QString, QList<QVariant>>
6. QMap<QString, QList<QString>>
See up to where you can reach before it fail, it will tell you which data type is not working for the type mapping. If they all succeed, then something might be wrong with the QList<QString> or QStringList if you prefer. Maybe the exposed type doesn’t handle the typedef properly when nested.
Jérôme Godbout, B. Ing.
Software / Firmware Team Lead
O: (418) 682-3636 ext.: 114
C: (581) 777-0050
godboutj at dimonoff.com<mailto:godboutj at dimonoff.com>
[signature_960691443]<https://www.dimonoff.com/>
dimonoff.com<https://www.dimonoff.com/>
1015 Avenue Wilfrid-Pelletier,
Québec, QC G1W 0C4, 4e étage
From: Interest <interest-bounces at qt-project.org> on behalf of John Schneiderman <jschneiderman at gog.com>
Date: Wednesday, April 14, 2021 at 2:56 AM
To: qt qt <interest at qt-project.org>
Subject: Re: [Interest] [EXTERNAL] Re: Send Data to JavaScript
On 12.04.2021 20:48, Jérôme Godbout wrote:
Have you tried with a QVariantMap for your Q_PROPERTY instead? Will be dull to convert from QVAriant to list and string for each values, but will probably work.
I've not tried using that, but looking at it, wouldn't it mean that I'd have to convert it each time to get the QStringList?
--
John Schneiderman
Senior Software Engineer
CDPR Squad
GOG.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210414/bf731239/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 13927 bytes
Desc: image001.png
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210414/bf731239/attachment.png>
More information about the Interest
mailing list