April 2018
Beginner
714 pages
18h 21m
English
Open the mainwindow.h file and create a private slots section in the class declaration, then declare the startNewGame() private slot, as shown in the following code:
class MainWindow : public QMainWindow{ Q_OBJECTpublic: explicit MainWindow(QWidget *parent = nullptr); ~MainWindow();private slots: void startNewGame();}
To quickly implement a freshly declared method, we can ask Qt Creator to create the skeleton code for us by positioning the text cursor at the method declaration, pressing Alt + Enter on the keyboard, and choosing Add definition in tictactoewidget.cpp from the popup.
Read now
Unlock full access