O'Reilly logo

Qt 5 Blueprints by Symeon Huang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required