Kick off your book project in 3 hours! Live workshop on Zoom. You’ll leave with a real book project, progress on your first chapter, and a clear plan to keep going. Saturday, May 2, 2026. Learn more…

Leanpub Header

Skip to main content

PySide6 Blueprints

Step-by-Step Desktop Application Development with Python and Qt6

A straightforward introduction to PySide6: Create functional, cross-platform GUIs in Python with practical, step-by-step blueprints.

Minimum price

$2.99

$4.99

You pay

$4.99

Author earns

$3.49
$
You can also buy this book with 1 book credit. Get book credits with a Reader Membership or an Organization Membership for your team.
PDF
EPUB
WEB
About

About

About the Book

Dive into PySide6, the official Python bindings for Qt6, with this practical blueprint-style guide. This book attempts to break down essential Qt concepts into focused, reusable patterns—each featuring step-by-step walkthroughs, complete code examples, and notes.

From core fundamentals to intermediate topics, you'll master:

  • Widgets, layouts, buttons, input widgets, dialogs and containers
  • Signals, slots, custom signals, and event handling
  • Model-view programming
  • Multithreading
  • Object ownership, timers, properties, databases, processes, and state machines

The book is currently in progress (about 60% complete, regularly updated), and all existing content is available right now as a free sample download. All code is available on GitHub .

Share this book

Categories

Author

About the Author

Contents

Table of Contents

1. Getting Started

  1. 1.1 Installation
  2. 1.2 Qt Widgets
  3. 1.3 Hello World
  4. 1.4 Hello World Again

2. Signals & Slots

  1. 2.1 Basic Signals & Slots Mechanism
  2. 2.2 Using Python Lambda Functions

3. Qt Widgets Layouts

  1. 3.1 Laying out Widgets Vertically - QVBoxLayout
  2. 3.2 Horizontal Layout - QHBoxLayout
  3. 3.3 Grid Layout - QGridLayout
  4. 3.4 Form Layout - QFormLayout

4. Display Widgets

  1. 4.1 Displaying Text with QLabel
  2. 4.2 Displaying Images with Qlabel
  3. 4.3 Displaying LCD-like Numbers with QLCDNumber

5. Qt Widgets Buttons

  1. 5.1 QPushButton
  2. 5.2 QCheckBox
  3. 5.3 QRadioButton

6. Numeric Widgets

  1. 6.1 QSpinBox
  2. 6.2 QDoubleSpinBox
  3. 6.3 QSlider
  4. 6.4 QDial

7. Text Widgets

  1. 7.1 QLineEdit
  2. 7.2 QTextEdit
  3. 7.3 QPlainTextEdit

8. List Widgets

  1. 8.1 QComboBox
  2. 8.2 QListWidget
  3. 8.3 QListView

9. Table Widgets

  1. 9.1 QTableWidget
  2. 9.2 QTableView

10. Tree Widgets

  1. 10.1 QTreeWidget
  2. 10.2 QTreeView
  3. 10.3 Lazy-loading Trees

11. Containers

  1. 11.1 QGroupBox
  2. 11.2 QScrollArea
  3. 11.3 QToolBox
  4. 11.4 QTabWidget
  5. 11.5 QSplitter

12. Building Complex UIs with QMainWindow

  1. 12.1 Setting Up the Central Widget
  2. 12.2 Adding a Status Bar
  3. 12.3 Creating Menus and Actions
  4. 12.4 Adding Toolbars
  5. 12.5 Using Dock Widgets
  6. 12.6 Completing the Editor

13. Dialogs

  1. 13.1 Standard Message Dialogs with QMessageBox
  2. 13.2 Input Dialogs with QInputDialog
  3. 13.3 File Dialogs with QFileDialog
  4. 13.4 Color Selection with QColorDialog
  5. 13.5 Font Selection with QFontDialog
  6. 13.6 Creating Custom Dialogs by Subclassing QDialog

14. Specialized Widgets

  1. 14.1 QDateTimeEdit
  2. 14.2 QCalendarWidget
  3. 14.3 QKeySequenceEdit
  4. 14.4 QFontComboBox

15. Multimedia & Visualization Widgets

16. Creating Custom Widgets

  1. 16.1 Subclassing QWidget – The Minimal Example
  2. 16.2 Painting with QPainter and paintEvent
  3. 16.3 Handling Mouse and Keyboard Events
  4. 16.4 Size Hints, Size Policies, and Layout Integration
  5. 16.5 Adding Custom Properties and Signals
  6. 16.6 A Real-World Example: Circular Progress Widget
  7. 16.7 Packaging and Reusing Your Custom Widget

17. Object Trees and Ownership

  1. 17.1 Parent-Child Relationships
  2. 17.2 Reparenting Qt Objects
  3. 17.3 Finding Qt Object Children
  4. 17.4 Manual Ownership Transfer

18. More Signals & Slots

  1. 18.1 A Common Pitfall
  2. 18.2 Custom Signals
  3. 18.3 Signal Blocking
  4. 18.4 Connection Objects
  5. 18.5 Connecting Multiple Slots with a Signal
  6. 18.6 Disconnecting

19. Events

  1. 19.1 Event Handlers
  2. 19.2 Object Event Filters
  3. 19.3 Application-Wide Event Filters
  4. 19.4 Event Propagation
  5. 19.5 Custom Events

20. Timers

  1. 20.1 Single-Shot
  2. 20.2 Starting and Stopping a Timer
  3. 20.3 Adjusting a Timer Interval
  4. 20.4 Countdown Timer
  5. 20.5 Stopwatch

21. Properties

  1. 21.1 Declaring Basic Properties
  2. 21.2 Properties Notification and Reset
  3. 21.3 Constant and Non-Stored Properties
  4. 21.4 Dynamic Properties for Validation-Based Styling
  5. 21.5 Animating Custom Properties
  6. 21.6 Inspecting Properties with QMetaObject

22. Model-View Programming with QAbstractListModel

  1. 22.1 Read-only List Model
  2. 22.2 Editable List Model
  3. 22.3 Editable List Model with Data-Widget Mapping
  4. 22.4 Resizable List Model

23. Model-View Programming with QAbstractTableModel

  1. 23.1 Basic Read-Only Table Model
  2. 23.2 Making the Table Model Editable
  3. 23.3 Using Data Widget Mapper with Table Models
  4. 23.4 Resizable Table Model

24. Model-View Programming with QAbstractItemModel

  1. 24.1 Basic Read-Only Single-Column Tree Model
  2. 24.2 Adding Multiple Columns to the Tree Model
  3. 24.3 Making the Tree Model Editable
  4. 24.4 Resizable Tree Model (Inserting and Removing Nodes)

25. Model-View Programming - Delegates

  1. 25.1 Using Item Data Roles to Customize Display
  2. 25.2 Registering Standard Widgets with QItemEditorFactory
  3. 25.3 Registering Custom Widgets with QItemEditorFactory
  4. 25.4 Custom Display in QStyledItemDelegate
  5. 25.5 Custom Editors in QStyledItemDelegate
  6. 25.6 Combining Display and Editing in Delegates
  7. 25.7 Persistent Editors in Views

26. Model-View Programming - Sorting, Filtering and Selection

  1. 26.1 Implementing In-Place Sorting in Custom Models
  2. 26.2 Non-Destructive Sorting in Custom Models
  3. 26.3 Automatic Sorting on Data Changes
  4. 26.4 Sorting with Proxy Models
  5. 26.5 Basic Filtering with Proxy Models
  6. 26.6 Custom Filtering in Proxy Models
  7. 26.7 Selection Modes and Behaviors
  8. 26.8 Responding to Selection Changes
  9. 26.9 Sharing Selection Models Between Views
  10. 26.10 Custom Selection Handling

27. Multithreading - moveToThread

  1. 27.1 Blocking the Qt GUI: How Not to Do It
  2. 27.2 A Minimal Working Example
  3. 27.3 Walking the Filesystem
  4. 27.4 Reusing the QThread object
  5. 27.5 Walking the Filesystem reusing the QThread Object
  6. 27.6 Signals and Slots Across Threads

28. Using a QThread subclass

  1. 28.1 A Minimal Example
  2. 28.2 Walking the Filesystem

29. Multithreading with QThreadPool and QRunnable

  1. 29.1 A Minimal Example
  2. 29.2 Walking the Filesystem

30. Thread Synchronization

  1. 30.1 Race Condition Demo
  2. 30.2 Queued Signal-Slot Connection
  3. 30.3 QMutex
  4. 30.4 QMutexLocker
  5. 30.5 QSemaphore
  6. 30.6 QSemaphoreReleaser
  7. 30.7 QWaitCondition

31 More Timers

32. Signals & Slots Connection Types

  1. 32.1 Direct Connection
  2. 32.2 Queued Connection
  3. 32.3 Blocking Queued Connection

33. Databases

  1. 33.1 Database Connections
  2. 33.2 Executing Simple Queries
  3. 33.3 Inserting Data
  4. 33.4 Displaying and Editing Data with QSqlTableModel
  5. 33.5 Handling Relational Data with QSqlRelationalTableModel
  6. 33.6 Custom Queries with QSqlQueryModel
  7. 33.7 The Single Record Form
  8. 33.8 The Master-Detail Form

34. Processes

  1. 34.1 Basic Process Execution
  2. 34.2 Providing Fixed Input to a Process
  3. 34.3 Handling Chunked Output: A Common Pitfall
  4. 34.4 Interactive Process Communication
  5. 34.5 Setting Process Environment
  6. 34.6 Synchronous Process Execution
  7. 34.7 Terminating Processes

35. State Machines

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub