April 2018
Beginner
714 pages
18h 21m
English
Qt also offers an easier way to make a connection between signals of the form's elements and the slots of the class. You can right-click on the button in the central area of the form editor and select the Go to slot... option. You will be prompted to select one of the signals available in the button's class (QPushButton). After you select the clicked() signal, Qt Creator will automatically add a new on_startNewGame_clicked slot to our MainWindow class.
The tricky part is that there is no connect() call that enforces the connection. How is the button's signal connected to this slot, then? The answer is Qt's automatic slot connection feature. When the constructor calls the ui->setupUi(this) function, ...
Read now
Unlock full access