O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

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

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 2Installation, 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 ...

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