PyQt6 & PySide6 Book now available!

Heads up! You've already completed this tutorial.

martin | 2021-04-09 15:18:58 UTC | #1

The PyQt6 edition and PySide6 edition of the Create GUI Applications book has just been released! If you have bought the PyQt5 or PySide2 editions of the book you have access to all versions, including this update -- just go to your account at https://account.learnpyqt.com. Enjoy!


martin | 2021-03-15 08:31:42 UTC | #6


martin | 2021-03-15 08:35:40 UTC | #7

This is a straight conversion of the latest PyQt5 & PySide2 editions of the book, updating code examples and reworking some parts where necessary.

The PyQt6 edition will be following shortly -- there are more incompatibilities with earlier versions, so this needs some additional rewrites. Should be complete by next week.

If you're sticking with PyQt5/PySide2 then good news: there will be one further update of the Qt5 books to add a few additional chapters I've been working on. The PySide6/PyQt6 editions will get these updates too at the same time.

Create GUI Applications with Python & Qt6 by Martin Fitzpatrick — (PySide6 Edition) The hands-on guide to making apps with Python — Over 10,000 copies sold!

More info Get the book

Let me know if you have any questions/feedback!


martin | 2021-03-15 08:35:45 UTC | #8


martin | 2021-03-15 08:35:48 UTC | #9


PedanticHacker | 2021-03-15 10:37:03 UTC | #10

Thanks for publishing the PySide6 edition of your book! I personally can't wait to check out the PyQt6 edition of it. :slight_smile:

Anyway, I have some feedback to give. It applies to the upcoming PyQt6 edition of your book as well.

Would it be possible to use f-strings in the example parts of the code? Like in the PySide6 edition of your book in the Listing 132. bitmap/paint.py (page 422) where the very last line of code is self.setStyleSheet("background-color: %s;" % color). That would look much nicer if it were self.setStyleSheet(f"background-color: {color};").

I know that you're trying to be as much backwards compatible as possible, but this old syntax looks very ugly. I personally believe that f-strings should be used at all times; they make Python code look very beautiful. The f-strings format joined the party in Python 3.6 and I believe that the vast majority of people are already on the 3.6+ boat.

Just my 2 cents. I hope you find any value in this.

Side note: Thanks for all your wonderful work, you are simply amazing!


martin | 2021-03-15 10:57:02 UTC | #11

Hey thanks, really appreciate it!

As for f-strings -- yes! I much prefer them too. This first release is still using the old style, since it shares the codebase with the final PySide2 editions (which supported 3.4). But they'll now start diverging and I'll be targeting 3.6 as a minimum -- that's the minimum version supported by PySide6/PyQt6 (+PyQt5) anyway, and like you say the majority of people are on it already.


Create GUI Applications with Python & Qt6 by Martin Fitzpatrick — (PyQt6 Edition) The hands-on guide to making apps with Python — Over 10,000 copies sold!

More info Get the book

Well done, you've finished this tutorial! Mark As Complete
[[ user.completed.length ]] completed [[ user.streak+1 ]] day streak

PyQt6 & PySide6 Book now available! was written by Martin Fitzpatrick .

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.