Create an action using the action editor and enter the following values in the dialog:
Now, create another action and fill it with the values shown in the following screenshot:
We want our game to look nice, so we will provide icons for the actions and we will embed images for them in our application using the resource system. Create a new file and make it Qt Resource File. Call it
resources.qrc. Click on the Add button and choose Add Prefix. Change the value for the prefix to
/. Then, click on the Add button again and choose Add Files. Find appropriate images for your actions and add them to the resource file. A dialog will appear asking whether you want to copy the files to the project directory. Agree by choosing Copy.