"PyQt5-Basics" | 01 Simple basic understanding

1 Qt understanding

  • Cross-platform C++graphical user interface application development framework;
  • It can GUIbe used to develop both programs and non- GUIprograms;
  • QtThe interface of the developed GUIprogram is the same as that of the current operating system;
  • The cross-platform mode of the program developed with Qtis source code level.

1.1 Supported platforms

MS/Windows - 9598、NT4.0、ME、2000、XP 、 Vista、Win7、win8、win2008、win10
Unix/X11 -Linux、SunSolaris、HP-UX、CompaqTru64 UNIX、IBMAIX、SGI IRIX、FreeBSD、BSD/OS和其它很多X11平台
Macintosh -Mac OS X
Embedded - 有帧缓冲(framebuffer)支持的嵌入式Linux平台,Windows CE、Symbian、Symbian^3、Symbian Anna、Symbian Belle、MeeGo、haiku-os。

1.2 Qt Creator

  • Qt CreatorIt is a Qtlightweight cross-platform integrated development environment for development;
  • Provide an integrated development environment ( ) designed to support cross-platform development IDE;
  • This ensures that developers who come into contact with the Qt framework for the first time can quickly get started and operate it.

2 PyQt5

2.1 PyQt5 main modules

  • The following are the main modules, you can learn other content from the official:
module illustrate
QtCore Core non- functions are used to handle objects such as time, files, directories, data types, text streams, links, threads or processes GUIinvolved in the program.QMimeData
QtGui Classes for basic graphics functions, such as window sets, event handling, 2D graphics, basic images and interfaces, fonts and text classes, etc.
QtWidgets A complete set UIof element controls for building Classican interface that conforms to the system style. You can choose whether to use this feature during installation.
QtMultimedia A set of class libraries for processing multimedia events, APIaccessing cameras, voice devices, sending and receiving messages ( Radio Functionality), etc. by calling interfaces
QtBluetooth Class library for handling Bluetooth activities, including scanning devices, connections, interactions and other behaviors
QtNetwork Network programming class library, providing TCP/IP及UDP的C/Scode collection
QtPositioning Obtain location information, such as satellite, wireless network, text information, etc.
Enginio Build client-side application libraries for runtime access to Qt Cloudserver-hosted applications
QtWebSockets A set of class programs used to implement WebSocketprotocols
QtWebKit Class library that implements WebKit2web browser-based
QtWebKitWidgets A set of class libraries for implementing a web browser Widgetsbuilt from packages based onWebKit1
QtXml XMLA class library for processing that provides functions for the implementation of SAXandDOM API
QtSvg A set of class libraries that provide functions for displaying the contents of vector graphics files
QtSql Database object interface
QtTest Unit testing, debugging PyQt5applications
QtHelp Classes for creating and viewing findable documents
QtOpenGL Use OpenGLlibraries to render 3D and 2D graphics
QtXmlPatterns Support for AND with XMLcustom data modelsXqueryXPath
QtDesigner Use PyQtextensionsQt Designer
Qt Combine classes from all modules into a single module
uic Process .uifiles

2.2 PyQt5 main classes

  • PyQt5 APIHave 620multiple classes and 6000functions;
  • The following are the main classes and descriptions:
kind illustrate
QObject The top class ( Top Class) is PyQtthe base class for all objects
QPaintDevice Base class for all drawable objects
QApplication Manage the control flow and main settings of GUI applications
QWidget Base class for user interface objects
QFrame Base class for framed window controls
QMainWindow Main application window with menu bar, dock windows (such as toolbars), and status bar
QDialog The most common top-level window

2.3 Inheritance relationship of important classes

  • PyQt 5Important classes and their inheritance relationships:
    Insert image description here
    Insert image description here
    Insert image description here
    Insert image description here
    Insert image description here

2.4 Common controls

control illustrate
QLabel Display text or image
QLineEdit A single-page, single-line text editor
QTextEdit A single-page multi-line text editor
QPushButton command button
QRadioButton radio button and a text or pixmap label
QCheckBox Checkbox with text label
QspinBox Allows the user to select a value, either by pressing the up/down keys to increase/decrease the currently displayed value, or by entering the value directly into the input box
QScrollBar horizontal or vertical scroll bar
QSlider Vertical or horizontal slider
QComboBox Combination button for popup list
QMenuBar horizontal menu bar
QStatusBar A horizontal bar suitable for presenting status information, usually placed at QMainWindowthe bottom of
QToolBar Toolbar, which can contain multiple command buttons, usually placed at QMainWindowthe top of
QListView Display and control optional multi-select lists, which can be setListMode或IconMode
QPixmap Display an image on a drawing device, usually placed in the QLabelor QPushButtonclass
Qdialog Base class for dialog windows

Guess you like

Origin blog.csdn.net/NoamaNelson/article/details/132473290