What just happened?

Creator created a new subdirectory in the directory that you previously chose for the location of the project. This new directory (the project directory) now contains a number of files. You can use the Projects pane of Qt Creator to list and open these files (refer to Chapter 2, Installation, for an explanation of Qt Creator's basic controls). Let's go through these files.

The main.cpp file contains an implementation of the main() function, the entry point of the application, as the following code shows:

#include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    w.show();
    return a.exec();
}

The main() function creates an instance of the QApplication class ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition 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.