Setting up a project

As usual, let's create a new project using Qt Creator. The following steps will help:

  1. We can create a new project by going to File | New File or Project and selecting Qt Widgets Application.
  2. Once your project has been created, open your project (.pro) file and add the network keyword so that Qt knows that you need the Networking module in your project:
QT += core gui network

Get Hands-On GUI Programming with C++ and Qt5 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.