-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to Qt QVariant #2216
Comments
Make your own alias like |
Thanks, simply that seems to work : using myjson = basic_json<QMap,QVector,QString,bool,int,unsigned int,double>; Silly me was trying to use QJSonValue:: thinking it was refering to types, but that was just an enum. Thank you ! |
Is this currently working? Using QVector as array type yelds the following error:
Probably because QVector doesn't support passing the allocator as template parameter. Any hint? Similar errors occur for QMap type. Thanks in advance, |
You could define a wrapper type that just consumes the template<typename T, typename AllocatorType>
class q_vector_wrapper<T, AllocatorType> : public QVector<T>
{}; |
Can this be elaborated a bit? I want to support QVector etc etc but I'm hitting walls left and right.
but lots of errors
|
Hi, i'm currently working with JSON in Qt/Qml. Because of Qt poor support for JSON, i'm using this library. So, i have to convert this library's default type, which is using stl types, to a QVariant/QJsonValue, which is using Qt types, and vice versa. It's ok, but it feels like a waste of computer power and memory. Just out of curiosity, is it possible to work something out by modifying this definition :
with something like
I'm no C++ expert, and i cannot make this work on my own, this is a bit too advanced for me.
Thanks
The text was updated successfully, but these errors were encountered: