Locate the tictactoe folder in the project tree (it's the top-level entry corresponding to our whole project), open its context menu, and select Add New... Select C++ in the left list and C++ Class in the central list. Click on the Choose button, input TicTacToeWidget in the Class name field, and select QWidget in the Base class drop-down list. Click on Next and Finish. Qt Creator will create header and source files for our new class and add them to the project.
Open the tictactoewidget.h file in Creator and update it by adding the highlighted code:
#ifndef TICTACTOEWIDGET_H #define TICTACTOEWIDGET_H #include <QWidget> class TicTacToeWidget : public QWidget { Q_OBJECT public: TicTacToeWidget(QWidget ...