Akik Look at that coder
Public account: Look at that code farmer
Introduction to the
GUI: Graphical user interface or graphical user interface
Qt: a cross-platform GUI library based on C++ that can be used to develop GUI interfaces on Qt.
PyQt5: Python interface based on graphical programming framework Qt. A successful integration of Python and Qt allows you to use Python to call the API in the Qt library.
These seven classes are often used when it comes to developing GUI applications for PyQt5, and we are now revisiting them.
1. The QObject class
QObject class: The base class for all PyQt objects. In other words, all classes in PyQt inherit from QObject. This makes all methods in QObject available to other classes and is the core of the PyQt object model.
2. The QPaintDevice class
QPaintDevice class: The base class for all drawable objects
3. QApplication class
QApplication class: Used to manage the control flow and main Settings of a graphical user interface application and has only one instantiated object, no matter how many Windows the application has. QApplication inherits from the QGuiApplication class and adds functions to support QWidget base components that control initialization and finalization of QWidget components.
4. QMainWindows class
The QMainWindow main window provides an application framework with its own layout to which controls can be added.
5. QWidget class
QWidget class: The base class of all user interface objects (the QDialog and QFrame classes inherit from the QWidget class), and all Windows and controls inherit directly or indirectly from the QWidget class.
6. QFrame class
QFrame class: Base class for window controls with frames. It is also used to directly create simple frames without any content. It is mainly used to control some border styles, such as raised, concave, shadow, line width, etc. Inherited from the QWidget class.
7. QDialog class
QDialog class: Dialog window class. Dialog box window is mainly used for short-term tasks and users to brief communication of the top window, PyQt5 defined a series of standard dialog box class, so that users can easily and quickly through each class to complete the size, font color and file selection, convenient human-computer interaction.
The subclasses of QDialog class mainly include QMessageBox, QFileDialog, QColorDialog, QFontDialog, QInputDialog, etc., which is mainly the application of subclasses.
If you find this helpful:
1. Click “like” to support it, so that more people can see this article
2, pay attention to the public number: look at that code farmers, we study together and progress together.
This article is participating in the “Nuggets 2021 Spring Recruitment Campaign”, click to see the details of the campaign