Create GUI Applications with PyQt6

Want to create Python GUIs? Here is everything you need to go from simple UIs to complete apps with PyQt6.

Building GUI applications with Python doesn't have to be difficult. In this tutorial I'll walk you step by step from simple Python GUIs to real useful apps.

By the end of the tutorial you'll be able to make your own applications, design professional UIs and even create installers and packages to share your apps with other people.

PyQt6 is a Python GUI framework for creating GUI applications using the Qt toolkit. Created by Riverbank Computing, PyQt is free software (GPL licensed) and has been in development since 1999. The latest version PyQt6 was released in 2021.

This tutorial requires some basic Python knowledge, but no experience with GUI programming.

Take your first steps creating Python GUI applications with these simple step-by-step guides to Python & Qt.

PyQt6 not installed? See our installation guides for Windows, macOS and Linux

Once you're set up you can get started by Creating your first GUI application with Python.

Now you have made your first GUI app, let's go a step further adding widgets and layouts to build some simple Python UIs.

So far we have been creating apps using Python code. This works well in many cases, but it can get a bit cumbersome to define all widgets programmatically. The good news is that Qt comes with a graphical editorQt Designer — which contains a drag-and-drop UI editor. Using Qt Designer you can define your UIs visually and then simply hook up the application logic later.

If you're upgrading from PyQt5, note that the QResource framework was removed in PyQt6.

Explore Qt Designer

Latest Qt Designer tutorials

Install Qt Designer Standalone

Qt Designer Download for Windows, Mac and Linux

Embedding custom widgets from Qt Designer

Learn how to use custom widgets in your PyQt6 applications when designing with Qt Designer

Creating Dialogs With Qt Designer

Using the drag and drop editor to build PyQt6 dialogs

Most Python apps need to interact with data sources — whether that's a CSV file, database or remote APIs. One of the main benefits of using Python to build applications is being able to make use of Python's data science tools to process and analyse data.

With PyQt6 you can make use of Qt's model view architecture to display performant views of any Python data in your applications. Or embed matplotlib and PyQtGraph plots for dynamic visualizations.

If you're using Qt Designer to create your applications, take a look at how to use PyQtGraph & Matplotlib widgets inside Qt Designer.

Explore Data Science

Latest Data Science tutorials

Plotting with PyQtGraph

Create custom plots in PyQt6 with PyQtGraph

Plotting with Matplotlib

Create PyQt6 plots with the popular Python plotting library

Displaying tabular data in Qt6 ModelViews

Create customized table views with conditional formatting, numpy and pandas data sources.

Building real applications, you'll find yourself wanting to perform long-running tasks. For example, your application might need to interact with remote APIs or perform complex calculations.

But you'll notice a problem: while the long-running task completes, your app will become unresponsive. Your code blocks Qt from running until it returns.

In these tutorials we'll discover how to use threads & processes to long-running tasks while keeping your app responsive.

Explore Concurrency

Qt comes with a large library of widgets built-in. But sometimes your applications need something different. In PyQt6 you can you design your own widgets, drawing them directly in your application.

In these tutorials we'll go through the basics of drawing graphics in Qt to building your own entirely custom widget.

Explore Custom Widgets

Latest Custom Widgets tutorials

Animating custom widgets with QPropertyAnimation

Add dynamic visual effects to your custom widgets

Creating custom GUI widgets in PyQt6

Build a completely functional custom widget from scratch using QPainter

QPainter and Bitmap Graphics

Introduction to the core features of QPainter

There comes a point in any app's development where it needs to leave home — half the fun in writing software is being able to share it with other people. Packaging Python GUI apps can be a little tricky, but these guides will walk you through the process step by step.

Explore Packaging & Distribution

Latest Packaging & Distribution tutorials

PyQt6 has two APIs for building GUIs. We've already introduced the Qt Widgets API which is well-suited for building desktop applications. Qt also provides a declarative API in the form of Qt Quick/QML. Qt Quick is well suited for building modern touchscreen interfaces for microcontrollers or device interfaces.

Explore QML/QtQuick


Hands-on guides to Python GUI programming

Books taking you from first principles to fully-functional apps, not toy examples.

See all Python GUIs books

Latest Updates

How Trademarks Affect Open Source Software

How do trademarks relate to copyrights and what are the implications for open source software

Customizing Your Tkinter App's Windows

Make Your Tkinter App's Windows Have Different Looks

Getting Started With Kivy for GUI Development

Your First Steps With the Kivy Library for GUI Development

PyQt6 Book now available in Korean: 파이썬과 Qt6로 GUI 애플리케이션 만들기

The hands-on guide to creating GUI applications with Python gets a new translation

PyQt vs. Tkinter — Which Should You Choose for Your Next GUI Project?

What Are the Major Differences Between these Popular Python GUI Libraries

Getting Started With Git and GitHub in Your Python Projects

Version-Controlling Your Python Projects With Git and GitHub

More articles