explaingit

pyqt5/pyqt

7,127PythonAudience · developerComplexity · 2/5Setup · moderate

TLDR

A collection of ready-to-run example scripts for PyQt5 and PyQt4 covering widgets, layouts, charts, 3D plots, threading, and web views so you can copy, run, and learn each GUI feature one at a time.

Mindmap

mindmap
  root((repo))
    What it does
      PyQt5 example scripts
      Copy and run demos
      Widget showcase
    Widget examples
      Buttons and layouts
      Lists trees tables
      Charts and 3D plots
    Advanced topics
      Threading patterns
      Web view embedding
      QML integration
    Community
      Chinese forum site
      Custom widget library
      Shared solutions
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Copy a PyQt5 example script to quickly add a specific widget, like a table, chart, or progress bar, to your desktop app.

USE CASE 2

Run the threading examples to learn how to do background work in a PyQt5 app without freezing the UI.

USE CASE 3

Use the web view examples as a starting point for embedding a browser widget or calling JavaScript from Python code.

USE CASE 4

Reference the chart examples to add a live-updating line chart or 3D surface plot to a PyQt5 data dashboard.

Tech stack

PythonPyQt5PyQt4QtQML

Getting it running

Difficulty · moderate Time to first run · 30min

Requires matching Python and PyQt5 versions, examples were written for specific Qt versions and may need small fixes on newer installs.

The explanation does not specify the license terms.

In plain English

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.

Copy-paste prompts

Prompt 1
Show me how to create a PyQt5 QTableWidget that loads data from a list of dicts and supports sorting by clicking a column header.
Prompt 2
I want to run a long database query in PyQt5 without freezing the window. Show me the QThread pattern from these examples.
Prompt 3
How do I embed a PyQt5 QWebEngineView in my app and call a Python function from JavaScript using Qt WebChannel?
Prompt 4
Give me a PyQt5 example that shows a progress bar updating in real time while a background thread does work.
Open on GitHub → Explain another repo

← pyqt5 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.