Python GUI FAQ

Common Python GUI Questions, Answered

Answers to our users most frequently answered questions, from licensing, packaging and libraries, to PyQt tips and tricks.

Showing articles for All (286) PyQt6 (127) PySide6 (17) PyQt5 (50) Streamlit (0) Tkinter (1) PySide2 (6) Kivy (0)

How to set working directory of QProcess

Running external programs from different folders using QProcess in PyQt5

How to use "File->New" to create a new (duplicate) window of current form

Open multiple instances of the same window from your PyQt6 application

Plotting with Two Y-Axes in PyQtGraph

How to display two data series with independent Y-axes on a single plot

How to Show Cursor Position in PyQtGraph Embedded in PyQt5

Add a crosshair overlay that tracks the mouse cursor on your PyQtGraph plots

QTableWidget Crashes When Updating Every 1 Millisecond

Why modifying widgets from background threads causes crashes and how to fix it with signals

Adding a Volume Meter to a PyQt5 Media Player

Use pydub and QMediaPlayer together to display real-time audio levels

Why Widgets Appear as Separate Windows

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

setAlignment(QtCore.Qt.AlignCenter) method is not working as expected

Why calling setAlignment on a QStackedLayout doesn't center your widgets, and what to do instead

How to Disable WebRTC in QWebEngineView with PyQt5

Control WebRTC settings and feature permissions in PyQt5's web engine

How to Use System Default Colors in Qt Stylesheets

Access your user's color scheme to keep your app looking native

Playing Sound in PySide6 with QSoundEffect

How to play audio files in your PySide6 application without them being silently garbage collected

Opening links in a new window with QWebEngineView

Redirect links to a separate floating browser window

Real Time Change of Widgets?

How to update the UI while in a loop

Fixing TypeError lambda() missing 1 required positional argument checked in Qt signals

Why connecting signals with lambda in PySide6 and PyQt6 can go wrong, and how to fix it

QWebEngineView change anchor behavior

How to intercept link clicks in QWebEngineView and open them in a new window or the system browser

Use mouse drag to change the width of a rectangle in PyQt6

Build a resizable rectangle widget with draggable edges, like a crop tool

Retrieve underlying data object from QAbstractTableModel

How to get the original Python object back from a selected row in a QTableView

Fixing PyQt Redraw Issues on macOS

Solving display and rendering glitches when running PyQt applications on macOS

Size of Matplotlib's navigation toolbar (too large by default compared to the other widgets)

How to customize the size and appearance of the Matplotlib navigation toolbar in PyQt6/PySide6

Widget size and placement in the tabs of a QTabWidget

How to control widget positioning in tab layouts using addStretch

File Image Browser App with thumbnails

Build a thumbnail image browser in PyQt6 using model/view architecture

Authentication and Authorization with PyQt5 or PySide2

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

Authentication and Authorization with PyQt6 or PySide6

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

Using concurrent.futures with PyQt6 for Long-Running Tasks

Keep your GUI responsive while fetching data from multiple APIs using Python's concurrent.futures
1 2 3 4 5 6 7 8 9 10 11 12