PyQt6 & PySide6 Book now available!

The PyQt6 edition and PySide6 edition of the Create GUI Applications book is now available! Enjoy!

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.

Let me know if you have any questions/feedback!

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!

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.

1 Like