Parsing JSON results

There are tons of companies that provide developers APIs to access to their services, including the dictionary, weather, and so on. In this chapter, we'll use Yahoo! Weather as an example to show you how to use its online API to get weather data. For more details about Yahoo! Weather API, refer to https://developer.yahoo.com/weather/.

Now, let's create a new project named Weather_Demo, which is a Qt Widget-based application project. As usual, let's first design the UI.

Parsing JSON results

We've removed the menu bar, tool bar, and status bar as we did before. Then, we added a Label, Line Edit, and Push Button on top of centralWidget. Their object ...

Get Qt 5 Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.