Hello friends, I am back with my next tutorial on the python Gui programming with the PyQt kit.
So,hope you prepare your environment for the programming, If not so read my last post on how to setup your environment for the PyQt development.
So, let's start developing our first Gui app.
Que:- So,What Gui is?
Ans:- The Term GUI stands for the Graphical User Interface. When we want to talk about our hardware we have basically two methods one is command line interface and the another is Graphical Interface, The Graphical Interface is the user interface through which a user interact with the amazing piece of hardware with graphical icons, visual indicators etc.
A PyQt Gui app have mainly five types of window
1) Dialog with Button at bottom
2)Dialog with Buttons at right
3) Dialog without Buttons
4)Main windows
5)Widget
In an GUI application dialogs play an important role they can be make announcements in the application like user asked to close the window or error occured and a lot more. In my imagination an application without the dialog is impossible to construct.
Dialogs are mainly of two types: - 1) Modal Dialog 2) Modeless Dialog
1) Modal Dialog:- A modal dialog is one which upon invoked takes all the control of the application. It means it is the only one through which the user can interact,when it is on the screen the whole application becomes dumb to the user. The user can interact to the application only after closing the window.
2)Modaless Dialog:- The other type of the dialog is modaless dialog. When this type of dialogs are invoked a user can interact the dialog as well as the whole application. There is no restriction to the user. This type of dialogs are used mainly to update the main window gui.
Let us understand the Modal dialog by implementing its code. So, here is the outline of what our application going to do, suppose we want to build an app in which we have all the records of our company employee and only a trusted people can see those records. In such case we want to implement an login mechanism first. If user successfully logged into the application only till it will see the list of employee otherwise it have to close the application. To build such application we think to implement the dialog window first and then show our main window only if we get the successfull login.
Now let us start the fun part by coding our application dialog.
To make the process easier I commented the whole code. Don't worry if you don't understand the code we will go through it line by line in the future tutorials.
Copy and paste the code to your file save it with the extension filename.pyw on windows.Double click on it to run the file.
Here is the output of the code:-
Don't worry we will come to the code bit by bit in the next tutorial.
Till then Happy Programming.
Have a great weekend.
So,hope you prepare your environment for the programming, If not so read my last post on how to setup your environment for the PyQt development.
So, let's start developing our first Gui app.
Que:- So,What Gui is?
Ans:- The Term GUI stands for the Graphical User Interface. When we want to talk about our hardware we have basically two methods one is command line interface and the another is Graphical Interface, The Graphical Interface is the user interface through which a user interact with the amazing piece of hardware with graphical icons, visual indicators etc.
A PyQt Gui app have mainly five types of window
1) Dialog with Button at bottom
2)Dialog with Buttons at right
3) Dialog without Buttons
4)Main windows
5)Widget
In an GUI application dialogs play an important role they can be make announcements in the application like user asked to close the window or error occured and a lot more. In my imagination an application without the dialog is impossible to construct.
Dialogs are mainly of two types: - 1) Modal Dialog 2) Modeless Dialog
1) Modal Dialog:- A modal dialog is one which upon invoked takes all the control of the application. It means it is the only one through which the user can interact,when it is on the screen the whole application becomes dumb to the user. The user can interact to the application only after closing the window.
2)Modaless Dialog:- The other type of the dialog is modaless dialog. When this type of dialogs are invoked a user can interact the dialog as well as the whole application. There is no restriction to the user. This type of dialogs are used mainly to update the main window gui.
Let us understand the Modal dialog by implementing its code. So, here is the outline of what our application going to do, suppose we want to build an app in which we have all the records of our company employee and only a trusted people can see those records. In such case we want to implement an login mechanism first. If user successfully logged into the application only till it will see the list of employee otherwise it have to close the application. To build such application we think to implement the dialog window first and then show our main window only if we get the successfull login.
Now let us start the fun part by coding our application dialog.
To make the process easier I commented the whole code. Don't worry if you don't understand the code we will go through it line by line in the future tutorials.
Copy and paste the code to your file save it with the extension filename.pyw on windows.Double click on it to run the file.
Here is the output of the code:-
Don't worry we will come to the code bit by bit in the next tutorial.
Till then Happy Programming.
Have a great weekend.

No comments:
Post a Comment