Advanced form editor usage
Now it's time to give the players a way to input their names. We will do that by adding a game configuration dialog that will appear when starting a new game.
Time for action – Designing the game configuration dialog
First, select Add New...
in the context menu of the tictactoe
project and choose to create a new Qt Designer Form Class,
as shown in the following screenshot:

In the window that appears, choose Dialog with Buttons Bottom
:

Adjust the class name to ConfigurationDialog
, leave the rest of the settings at their default values, and complete the wizard. The files that appear in the project (.cpp
, .h
, and .ui
) are very similar to the files generated for the MainWindow
class when we created our project. The only difference is that MainWindow
uses QMainWindow
as its base class, and ConfigurationDialog
uses QDialog
. Also, a MainWindow
instance is created in the main
function, so it shows when the application is started, while we'll need to create a ConfigurationDialog...