Wednesday, March 18, 2020

Great new PyQt book

It's been a while since I did any GUI coding in Python, so I thought I'd clear out the cobwebs with Mastering GUI Programming with Python by Alan Moore. I was very pleasantly surprised. It covers PyQt5 from the ground up.

This book is fantastic, and the first proper successor to the previous go-to book on learning this stuff: Summerfield's 2008 book on PyQt 4, which I read cover to cover about 6 years ago. While I thought I would just be refreshing my memory, it is teaching me a lot of new things about PyQt (e.g., the stuff on using QProxyStyle to override the default style is amazing -- Summerfield didn't cover it, and I had never even heard of it before).

It is quite comprehensive in scope (unless you want to do a deep dive with tree views), and very clearly written. I know a lot of Packt publishing books are pretty awful, but this bucks that trend.


If you have never used PyQt, or need a refresher course, this book is where I would start if you want a comprehensive, detailed, overview. Qt is much too expansive, complex, and idiosyncratic of a framework to leave to little web tutorials. A large-scale opus is what's needed, and this foots the bill perfectly.

Note I know it sounds like I was paid to write this: I wasn't. I bought the book with my own money and am writing this of my own volition during my week off. :)