/PyQt5_example

✨This is an pyqt5 example.πŸ”₯Good project structure. πŸ’»It can be directly used for rapid development, database connection, login and registration.

Primary LanguagePythonApache License 2.0Apache-2.0

pyqt5_example

  • ✨ This is an pyqt5 example πŸ”₯
  • πŸ’» It can be directly used for rapid development, database connection, login and registration

🎯Including the software startup screen, which can be used to load the library in advance

🎯Including login interface
🎯Including the registration interface
🎯Including database management interface
🎯Including the main window, real-time display of CPU utilization

🎯Includes the taskbar minimize icon

Project file structure

pyqt5_example/   # β†’ Root
β”œβ”€ doc (document related)
β”œβ”€ config (program initialization configuration related)
β”‚     β”‚  skin (folder for storing skin)
β”‚     └─ config.py (configuration file)
β”œβ”€ core (custom control)
β”‚     β”‚  CpuLineChart.py (line chart showing CPU utilization, which can be improved by yourself)
β”‚     β”‚  DynamicSpline.py (dynamic line chart, which can be improved by yourself)
β”‚     β”‚  FileIconProvider.py (file icon, you can continue to improve yourself)
β”‚     β”‚  ImageView.py (picture viewing control, supports zooming pictures, and can continue to improve by yourself)
β”‚     β”‚  MetroCircleProgress.py (dynamic progress bar, stateless continuous cycle)
β”‚     └─ MySystemTrayIcon.py (custom system tray icon class)
β”œβ”€ res (resource folder used by the program)
β”‚     β”‚  app.qrc (qt-designer πŸ’» Edited resource collection file)
β”‚     └─ app_rc.py (pyrcc5 converted resource file, 🚫 (do not modify))
β”œβ”€ ui (UI folder of the program)
β”‚     β”‚  login_form.ui (login interface)
β”‚     β”‚  register_form.ui (registration interface)
β”‚     β”‚  mysql_form.ui (database management interface)
β”‚     β”‚  close_dialog.ui ((close prompt interface)
β”‚     └─ main_window.ui (main window file)
β”œβ”€ models (database related folder)
β”‚    β”‚  db.sql (generate database file)
β”‚    └─ user.py (user table transaction logic)
β”œβ”€ utils (folder of tool classes)
β”‚    β”‚  CommonHelper.py (public help class)
β”‚    β”‚  global_var.py (global variable class)
β”‚    β”‚  connect_mysql.py (connect to database)
β”‚    └─ logs.py (Global log display processing)
β”œβ”€ win (window logical folder)
β”‚    β”‚  splash (software startup screen, used to load the deep learning library in advance)
β”‚    β”‚  close_dialog.py (close the processing logic of the button prompt box)
β”‚    β”‚  main_win.py (logical processing of main window)
β”‚    β”‚  login_form.py (logical processing of login interface)
β”‚    β”‚  register_form.py (logical processing of registration interface)
β”‚    └─ mysql_form.py (logical processing of database management interface)
β”œβ”€ app.py (program entry file)
β”œβ”€ .gitignore (git uploads ignored files)
β”œβ”€ file_verison_info.txt (software version information)
β”œβ”€ LICENSE (open source agreement supported by the project)
β”œβ”€ pyqt5_example.spec (file packaged by pyinstaller)
β”œβ”€ pyqt5_example_exe.spec (file packaged by pyinstaller)
β”œβ”€ requirements.txt (project dependent Library)
β”œβ”€ ui_to_py.bat
β”‚    β”œβ”€ !Pay attention to coda environment modification
β”‚    β”œβ”€ Start πŸ’» Automatically convert UI files using pyuic and pyrcc5
β”œβ”€ start-qt-designer.bat
β”‚    β”œβ”€ !Pay attention to modifying the coda environment path
β”‚    β”œβ”€ Start πŸ’» QT designer tool
└─ README.md (project description document)

Environmental installation

# CONDA creates Python virtual environment
conda create -n learn_pyqt5 python=3.8
# Activate environment
conda activate learn_pyqt5

# Installation Library
pip install -r requirements.txt

# Modify the MySQL server configuration information in `/config/config.py` in file

# Add a database to the database and run `/model/db.sql` file

# Pack
# It is packaged into many files. It is recommended to use it when it is very dependent
pyinstaller pyqt5_example.spec

# Package into a separate exe. It is recommended to use small files
# One drawback is that it will first read into memory and decompress the dependency to the cache directory.
# If the application is large, it is recommended to package it into a folder
pyinstaller pyqt5_example_exe.spec