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
$

...Or Buy With Credits!

You can get credits with a paid monthly or annual Reader Membership, or you can buy them here.
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

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. Complex Widgets

15. Further Topics

16. Further Topics

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

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

25. Model-View Programming - Delegates

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

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

34. 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 $14 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