| #This tutorial for to get a confirmation from the user by promting window |
| #Python package "pymsgbox" needs to be install before run this below code |
| #To install "pymsgbox" package go to command prompt and type in "PIP3 INSTALL pymsgbox" |
| import pymsgbox |
| #Displays a message box with OK and Cancel buttons. Number and text of buttons can be customized. Returns the text of the button clicked on. |
| replyV = pymsgbox.confirm(text='Please login your application and click on on okay', title='Login Confirmation', buttons=['OK', 'Cancel']) |
| print(replyV) |
| #Displays a simple message box with text and a single OK button. Returns the text of the button clicked on. |
| replyV = pymsgbox.alert(text='Please confirm!', title='', button='OK') |
| print(replyV) |
| #Displays a message box with text input, and OK & Cancel buttons. Returns the text entered, or None if Cancel was clicked. |
| replyV1 = pymsgbox.prompt(text='enter', title='enter') |
| print(replyV1) |
| #Displays a message box with text input, and OK & Cancel buttons. Typed characters appear as *. Returns the text entered, or None if Cancel was clicked. |
| replyV2 = pymsgbox.password(text='password', title='', mask='*') |
| print(replyV2) |
Install below packages - for windows pip install PyQt5 pip install PyQt5-tools pip install pyqt5-installer Download PyQt5 Designer from the below link https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.6/PyQt5-5.6-gpl-Py3.5-Qt5.6.0-x32-2.exe/download
Comments
Post a Comment