Copy a PyQt5 example script to quickly add a specific widget, like a table, chart, or progress bar, to your desktop app.
Run the threading examples to learn how to do background work in a PyQt5 app without freezing the UI.
Use the web view examples as a starting point for embedding a browser widget or calling JavaScript from Python code.
Reference the chart examples to add a live-updating line chart or 3D surface plot to a PyQt5 data dashboard.
Requires matching Python and PyQt5 versions, examples were written for specific Qt versions and may need small fixes on newer installs.
This repository is a collection of working example scripts for PyQt4 and PyQt5, the Python bindings for the Qt graphical user interface framework. Qt is a system for building desktop applications with windows, buttons, menus, charts, and other visual components. Each script in the repo demonstrates one specific widget or feature so you can copy it directly, run it, and see the result. The collection covers a wide range of Qt components. Layout examples show how to arrange controls vertically, horizontally, and in grids with spacing and proportional sizing. Button examples include animated buttons, progress overlays, and rubber-band effects. List, tree, and table widgets are demonstrated with JSON data sources, drag-and-drop behavior, sorting, and embedded custom widgets. There are also examples for scroll areas, tabs, stacked panels, combo boxes with linked dropdowns, sliders with click-to-jump behavior, and various progress bar styles including circular, water-wave, and colourful animated variants. Chart examples cover line charts, bar charts, pie charts, scatter plots, stacked variations, and a live CPU monitoring chart. Three-dimensional data visualization examples include bar charts and surface plots. Web view examples show how to embed a browser widget, interact with JavaScript, intercept network requests, and capture screenshots of web pages. Threading examples cover the two common patterns for running background work in PyQt: subclassing QThread and moving objects between threads. There are also examples for QML integration and for connecting Python code to a web page through Qt's WebChannel bridge. The accompanying website at pyqt.site is a Chinese-language community forum where contributors share notes and solutions gathered from their own learning. A custom widget library and a standalone PyQt client application are listed as related projects in the repository.
← pyqt5 on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.