Time for action – Adding widgets to the form
Locate the Label item in the toolbox (it's in the Display Widgets category) and drag it to our form. Use the property editor to set the objectName property of the label to player1Name. objectName is a unique identifier of a form item. The object name is used as the name of the public field in the Ui::MainWindow class, so the label will be available as ui->player1Name in the MainWindow class (and will have a QLabel * type). Then, locate the text property in the property editor (it will be in the QLabel group, as it is the class that introduces the property) and set it to Player 1. You will see that the text in the central area will be updated accordingly. Add another label, set its objectName to player2Name and its text to Player 2.
Drag a Push Button (from the Buttons group) to the form and use the F2 key to rename it to Start new game. If the name does not fit in the button, you can resize it using the blue rectangles on its edges. Set the objectName of the button to startNewGame.
There is no built-in widget for our game board, so we will need to create a custom widget for it later. For now, we will use an empty widget. Locate Widget in the Containers group of the toolbox and drag it to the form. Set its objectName to gameBoard: