PDA

View Full Version : How to synchronize/get data from server?



fearlay
20th May 2016, 15:53
Hello everyone!

I have been doing a really small app for myself (hobby).
Is it possible to get data from some webpage or server? For example, by pressing the PULL button I want to get live currency rates from some website (e.g. http://www.xe.com/) and put them into my inputs...
11946

Is it possible? Can you give me some hints how to do this? :)

d_stranz
20th May 2016, 17:38
Often the developers of these sites have implemented an API for this purpose, using SOAP, JSON or some similar protocol. The site you give has such an API: http://www.xe.com/xecurrencydata/, but it isn't free. There are some free ones (http://www.freecurrencyconverterapi.com/) out there.

Qt has classes for implementing JSON-based protocol. SOAP is XML-based, and Qt has XML classes too. And classes for HTTP communication with servers. Look at the examples and tutorials that came with your Qt installation.