Changelog

We're regularly updating the site with new tutorials, updates and corrections with the support of the Python community.

Found something wrong? Send Feedback & Corrections

How to compile PyQt6 or PySide6 code with Nuitka

Convert your Python Qt applications to fast native executables using the Nuitka compiler

Actions in one thread changing data in another

How to communicate between threads and windows in PyQt6

PySide6 Widgets

Using QPushButton, QCheckBox, QComboBox, QLabel, QSlider and more widgets in your Python GUI apps

PyQt6 Widgets

Using QPushButton, QCheckBox, QComboBox, QLabel and QSlider widgets

PySide2 Widgets

Using QPushButton, QCheckBox, QComboBox, QLabel and QSlider widgets

PyQt5 Widgets

Using QPushButton, QCheckBox, QComboBox, QLabel and QSlider widgets

Streamlit Widgets

An Overview of Commonly Used Widgets in Streamlit

Getting Started with Streamlit

Build your first Streamlit app and explore some basic features

Streamlit Buttons

Making things happen with Streamlit buttons

Handling Image Drag and Drop from Web Browsers in PyQt6

Why toLocalFile() returns an empty string and how to handle remote image drops correctly

Keeping Your Main Window Open After Closing a Dialog in PyQt6

Why your app closes when you dismiss a dialog, and how to fix it

Passing Arguments to Threaded Functions in PyQt6

Understanding the difference between passing a function and calling a function when using QThreadPool and QRunnable

How to Change the Decimal Separator in QDoubleValidator

Use QLocale to control the decimal point format in PyQt6 QLineEdit validation

Dynamically Adding Rows of Widgets in PyQt6

How to use QGridLayout to add multiple widgets per row at runtime

Fixing Crashes When Using NumPy Arrays with QImage in Qt Threads

How to safely pass image data between threads when streaming video or updating displays

Creating PySide6 UI without .ui / Qt Designer

Build your entire GUI in pure Python code, no .ui files required

Using Complex Data Sources with PyQt6 Model/View Architecture

How to use JSON, nested data, and other complex structures in your Qt table and list views

Constantly Print Subprocess Output While Process is Running

How to stream live output from a subprocess into your PyQt6 GUI without freezing the interface

Understanding QPainter Coordinates in PyQt6

How the coordinate system works for drawing on canvases in PyQt6

Why Widgets Appear as Separate Windows

Understanding widget parenting in Qt and how to fix widgets that float outside your main window

Combo Box delegate disappears with QSortFilterProxyModel applied

Why your QTableView delegate vanishes when you add a proxy model, and how to fix it

Clearing the canvas in QPainter

Fix the common black background issue when painting on a QPixmap in PyQt6

Clean up on exit — Stopping threads when closing a PyQt6 application

How to properly shut down background threads and workers when your application window is closed

Changing Ticks in PyQtGraph Objects to Strings

How to replace numeric axis ticks with custom labels like month names or dates in PyQtGraph

How to Check if a QLineEdit is Empty in Python

Empty strings are falsey in Python

Adding QTabWidget to a Layout Alongside Other Widgets in PyQt6

How to combine QTabWidget with other layouts without it taking over your entire window

Getting a Value from a Model Using Row-Column Indices

How to retrieve data from a Qt model using row and column integers

Change color in QProgressBar delegate

How to dynamically change QProgressBar colors in a QTableView delegate

Are there any built-in QIcons?

Using built-in icons for your apps.

How Do I Display Images in PySide6?

Using QLabel and QPixmap to easily add images to your applications

How Do I Display Images in PyQt6?

Using QLabel and QPixmap to easily add images to your applications

How to Set Row Background Colors in a QTableView

Use Qt's BackgroundRole to color entire rows based on your data

Authentication and Authorization with PyQt6 or PySide6

Secure your desktop applications with login flows, token-based auth, and role-based access control

How do I display an Image in PySide2?

Using QLabel and QPixmap to easily add images to your PySide2 applications

How do I display an Image in PyQt5?

Using QLabel and QPixmap to easily add images to your applications

Adding QComboBox to a QTableView and getting/setting values after creation

Use QItemDelegate to embed combo boxes in your table views, with per-row data and value tracking

Fixing Missing Icons in PyInstaller-Packaged PyQt6 Applications on Windows

Why your app icon disappears after packaging and how to fix it

How to Add Custom Widgets to Qt Designer

Use widget promotion to integrate your own Python widgets into Qt Designer layouts

Sorting and Filtering a QTableView with QSortFilterProxyModel

Learn how to add interactive sorting and filtering to your PyQt/PySide table views without touching your underlying data

Checkboxes in Table Views with a Custom Model

Show checkboxes for boolean values in PyQt/PySide table views

How to Show Only Icons in QTableView Cells (Hide Text)

Use custom model roles to display icons without text in your PySide6 tables

System Tray & Mac Menu Bar Applications in PySide6

Add quick access functions to your apps

LearnPyQt — One year in, and much more to come.

A quick retrospective on 2019

No2Pads, a simple Notepad clone

The QTextEdit widget does 90% of the work

How to Restore the Window's Geometry in a PyQt6 App

Make Your Windows Remember Their Last Position and Size

Creating Dialogs With Qt Designer and PyQt6

Using the drag and drop editor to build PyQt6 dialogs

Using QProcess to Run External Programs in PyQt5

Run background programs without impacting your UI

Display Table with QTableWidget

How to display database query results in a PyQt6 table using QTableWidget

Introduction to the QGraphics Framework in PySide6

Creating vector interfaces using the QGraphics View framework