Creating a dockable and floatable sign-in form
In this recipe, we will learn to create a sign-in form that will ask for the email address and password of the user for authentication. This sign-in form is different from the usual sign-in form, in the sense that it is a dockable form. That is, you can dock this sign-in form to any of the four sides of the window—top, left, right, and bottom and can even use it as a floatable form. This dockablesign-in formwill be created using theDock
widget, so let's get a quick idea about theDock
widget.
Getting ready
To create a detachable set of widgets or tools, you need a Dock
widget. A Dock
widget is created with the QDockWidget
class and is a container that has a title bar and buttons at the top to size it. The Dock
widget, which contains a collection of widgets or tools, can be closed, docked in the dock area, or floated and placed anywhere on the desktop. The Dock
widget can be docked in different dock areas, such as LeftDockWidgetArea
, RightDockWidgetArea...