1

I'm using Qt4.7 on a Windows machine. I can't update Qt to version 5 and I'm unable to install CMake.

I need to use QJSon for a project, but it seems to be only available natively on Qt5+. Can anyone instruct me on how to "backport" it or something?

I also found this class for JSON handling that might serve the same purpose. If I wanted to use it instead, do I only need to import it to my project?

Please escuse me if this is all too simple/evident, but I'm new to desktop development, I only have some experience with webdesign, so any help is welcome. :)

4

1 回答 1

1

Whilst you could attempt to backport QJson you're best off going for the second option, simply for ease. All you need to do is bring the files into your project, if you're using Qt Creator when you do 'Add existing...' it should automatically add the include and header to the compilation phase. If it doesn't you add them to the .pro file so the compiler knows what it needs to include.

于 2013-05-29T09:37:52.467 回答