Introduction to PyQt5 and its modules with widgets and classes .
Introduction to PyQt5 : Python
PyQt is a GUI widgets toolkit. It is a Python interface for Qt, one of the most powerful, and
popular cross-platform GUI library. PyQt was developed by RiverBank Computing Ltd.
in simple words PyQt is a python external module which is used for creating modern GUI applications .
It is available with python 2.x and 3.x versions .
PyQT5 is implimented as a set of python modules . It has over 620 classes and 6000 functions and methods .
Supporting Environments :
PyQt is compatible with all the popular operating systems . It is a multiplatform toolkit which runs on all major operating system , including Unix , windows and Mac Os.
Installation :
For windows : pip install pyqt5
PyQt API is a large collection of classes and methods. These classes are defined in more than
20 modules. Following are some of the frequently used modules:
| QtCore | Core non-GUI classes used by other modules |
| QtGui | Graphical user interface components |
| QtMultimedia | Classes for low-level multimedia programming |
| QtNetwork | Classes for network programming |
| QtOpenGL | OpenGL support classes |
| QtSql | for database integration using SQL |
| QtWebKit | Classes for rendering and editing HTML |
| QtXml | Classes for handling XML |
| QtAssistant | Support for online help |
Here is a select list of frequently used widgets:
| QLabel | Used to display text or image |
| QLineEdit | Allows the user to enter one line of text |
| QTextEdit | Allows the user to enter multi-line text |
| QPushButton | A command button to invoke action |
| QRadioButton | Enables to choose one from multiple options |
| QCheckBox | Enables choice of more than one options |
| QSpinBox | Enables to increase/decrease an integer value |
| QScrollBar | Enables to access contents of a widget beyond display aperture |
| QSlider | Enables to change the bound value linearly. |
| QComboBox | Provides a dropdown list of items to select from |
| QMenuBar | Horizontal bar holding QMenu objects |
| QStatusBar | Usually at bottom of QMainWindow, provides status information |
| QToolBar | Usually at top of QMainWindow or floating. Contains action buttons |
| QListView | Provides a selectable list of items in ListMode or IconMode |
Structure of a pyqt application .
# -----------------------------------------------------------------------------------------------------------------------------------------------------#



No comments