We have implemented all the important functionalities of our game, and now we will start improving it by exploring other Qt features.
Polishing the application
Size policies
If you change the height of the main window of our game, you will note that different widgets are resized in a different way. In particular, buttons retain their original height, and labels gain empty fields to the top and bottom of the text:
This is because each widget has a property called sizePolicy, which decides how a widget is to be resized by a layout. You can set separate size policies for horizontal and vertical directions. A button has a vertical size policy of Fixed by default, which means that the height of the widget will not change from...