Currency conversion

In this example, we will learn how to create a simple currency converter using Qt, with the help of an external service provider called Fixer.io.

How to do it…

Make yourself a currency converter with these simple steps:

  1. We start by opening Qt Creator and creating a new Qt Widgets Application project from File | New File or Project.
  2. Next, open up the project file (.pro) and add the network module to our project:
    QT += core gui network
  3. After that, open up mainwindow.ui and remove the menu bar, tool bar, and status bar from the UI.
  4. Then, add three horizontal layouts, a horizontal line, and a push button to the canvas. Once they're all placed, left-click on the canvas and follow by clicking the Lay Out Vertically button above the canvas. ...

Get Qt5 C++ GUI Programming Cookbook 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.