In this tutorial, you will learn how to make a login screen like in the screenshot below.
You should always create a widget by passing its parent widget as a first parameter to the contructor.
The second parameter is optional, but when you do pass a name then you will be able to retreive the widget from the window later. Like this, you don’t have to store the widget yourself.
Now that the widget (in this case a picture) is created, you can set it up.
We are also going to create an edit box. The code is similar to creating the picture.
We could load the second edit box in exactly the same way, but I want to show you how to copy widgets.
As because this is an edit box that contains a password, we will set a password character.
The rest of the widgets are created in a similar way and I am not going to explain every line.
Below you can find the code to create all the widgets inside the login screen.
Take a moment to read through it to make sure you understand everything.