PySide2 Book 4th Edition

“The easy way to create desktop applications”

 Book

4th Edition, April 2021

Stop searching for how to create GUI applications with — it's all here. I've been teaching PySide for 8 years, helping thousands of developers just like you to bring their apps to life. Let's make your project a success!

  • 600+ page ebook of hands-on PySide2 exercises
  • 200+ code examples to experiment with
  • Email support for readers
  • Includes 4 example apps
  • Compatible with Python 3.4+
  • Code free to reuse in your own projects
  • PDF, EPub and Kindle formats
  • 2 in 1 — you get access to both PySide2 & PySide6 editions
  • Includes free updates forever

30 day no-questions money back guarantee.

To support developers in [[ countryRegion ]] I give a [[ localizedDiscount[couponCode] ]]% discount on all books and courses.

[[ activeDiscount.description ]] I'm giving a [[ activeDiscount.discount ]]% discount on all books and courses.

Get the Book $19

Downloadable ebook (PDF, ePub) & Complete Source code

Also available via Leanpub, Amazon Paperback and Paddle.

The detailed coverage of multithreading is something I couldn't find anywhere else, and you made it so simple!

Loved the tutorial, the thing is that I don't have to memorize it. I understood it.

I bought your PyQt5 book because I wanted a simple way to create native applications, and  I was not disappointed.

In the book

Basic concepts and first steps

Starting from the very basics of creating a desktop window this modern PySide2 book takes you on a tour of the key features of PySide2 you can use to build real-life applications.

We'll look at the basic building blocks of PySide2 applications — Widgets, Layouts & Signals and learn how PySide2 uses the event loop to handle and respond to user input.

Create GUI Applications Example pages
Creating applications with Qt Designer

Designing UIs with Qt Designer

Build your user interfaces visually in the Qt Designer drag-and-drop editor. We'll take a quick tour of the designer and show how to load your created interface into Python.

Unleash your creativity

Think the default look of Qt is a bit drab? You can customize almost anything using Styles, Palettes and Qt Style Sheets. We'll take a tour through how you can use these to completely customize the look and feel of your applications.

PySide2 themes and styles

Build data-driven applications

Use PySide2's MVC-like interface to work efficiently with data, right in your applications. Use custom data stores and sync widgets automatically, allowing you to focus on the logic.

Use tabular views to display SQL databases and numpy or pandas datastructures. Use linked widgets for easy editing.

Create your own custom widgets

PySide2 provides a huge number of built-in widgets, but sometimes you need a little something extra. Starting with an introduction to bitmap graphics we'll build up to creating entirely custom-drawn widgets for your apps.

Creating custom PySide2 widgets
Multithreading & processes with PySide2

Efficient apps with threads and processes

Are your apps stuttering to a halt? Learn how to use threads & processes to keep long-running calculations, loading large files or connections to remote servers all running smoothly.

Capture output from threads and processes and keep your users informed with progress bars and thread managers.

Visualize data with interactive charts

Use matplotlib or PyQtGraph to display data within your app. Use threads to create live dashboards, pulling data from your calculations or remote services.

Unlock the data-analysis capabilities of Python from within your applications.

Plotting in PySide2
Example PySide2 applications

Build real apps not just examples

Move beyond simple examples, learning how to use to create fully-functional applications.

The book guides you through creating a simple Web browser, Minesweeper game, Paint app and a Simple Todo reminder, using the features you've learned.

Package your apps for distribution

Once your app is ready, it's time to share it!

Discover how to package your applications for distribution on Windows, Mac and Linux.

Creating PySide2 installers

Every chapter comes with complete, runnable code examples.

About the author

Martin Fitzpatrick

Senior Software Engineer, Python Tutor

Martin Fitzpatrick has been developing Python/Qt apps for 8 years. Building desktop applications to make data-analysis tools more user-friendly, Python was the obvious choice. Starting with Tk, later moving to wxWidgets and finally adopting PyQt, he hasn't looked back since.

Table of Contents

  1. Basic PySide2 Features
    • My first Application
    • Signals & Slots
    • Widgets
    • Layouts
    • Actions, Toolbars & Menus
    • Dialogs
    • Windows
    • Events
  2. Qt Designer
    • Installing Qt Designer
    • Getting started with Qt Designer
    • The Qt Resource system
  3. Theming
    • Styles
    • Palettes
    • Icons
    • Qt Style Sheets (QSS)
  4. Model View Architecture
    • The Model View Architecture — Model View Controller
    • A simple Model View — a Todo List
    • Tabular data in ModelViews, with numpy & pandas
    • SQL databases with Qt models
  5. Further Qt6 Features
    • Extending Signals
    • Routing
    • Working with command-line arguments
    • System tray & macOS menus
    • Enums & the Qt Namespace
  6. Custom Widgets
    • QPainter and Bitmap Graphics
    • Creating Custom Widgets
  7. Concurrent Execution
    • Introducing Threads & Processes
    • QRunnable and the QThreadPool
    • QRunnable Examples, Progress Bars & thread Managers
    • Running external commands with QProcess
  8. Plotting
    • PyQtGraph
    • Matplotlib
  9. Packaging & Distribution
    • Packaging with fbs
  10. Example applications
    • Web Browser
    • Minesweeper
  11. Appendices
    • Translating C++ to Python
    • PySide2 vs. PyQt5

Includes 211 PySide2 code examples and 4 fully-functional application to experiment with.

Get the Book $19

Frequently Asked Questions

How will I get my purchase?

After completing your purchase you'll receive an email with a link to get your files and course. Keep it secret, keep it safe.

How do I get updates?

You'll receive an email when new content is available, although you can opt out of this if you wish.

What if I don't like it?

If you decide that it is not for you, just reply to the purchase receipt email within 30 days and I'll issue you with a refund. If you could tell me why, that would be great too but it's not necessary.

I have other questions

If you still have questions just drop me an email.