1

Based on a SO question, I was able to successfully pass primitive variables between Javascript and C++. Ideally, I would like to be able to send complex objects. I read through the documentation but didn't find anything related to this. I could JSON encode my object and send it through that way but I was wondering if there was a Qt supported way of doing this.

Here is the original question that I referenced: How to send data to and from the browser with a Qt HTML5 Application

Community
  • 1
  • 1
tier1
  • 6,303
  • 6
  • 44
  • 75
  • How about using [JSON](http://stackoverflow.com/questions/5612787/converting-an-object-to-a-string) to serialize and deserialize the objects? Qt can even deserialize it for you as of [Qt 5.2](http://qt-project.org/doc/qt-5/json.html). – deGoot May 08 '14 at 23:15
  • I thought about that. I will go this route if I cannot find anything else. Even though Qt has libraries to help, I wasn't looking forward to writing JSON serialization code for 500+ objects. – tier1 May 09 '14 at 00:04
  • That's when [Metaprogramming](http://en.wikipedia.org/wiki/Metaprogramming) comes in. – deGoot May 09 '14 at 02:35

0 Answers0