qt5 python gui programming_Qt5 Python GUI Programming Cookbook: Building responsive and powerful cro...

澹台星光
2023-12-01

This is a good book if you know little or nothing about Python GUI toolkits. It does a great job of going through all the standard GUI classes and how to use each one, one-at-a-time. It shows how to build single stand-alone "toy" applications that are cross-platform.

PyQT versus Tkinter: PyQt is the only realistic GUI framework for building scalable, refactorable Python applications. Tkinter is horrible for sophisticated applications when it comes to enhancement or maintenance, and Tkinter performance is poor for large applications.

I read the author's earlier book dated 2012. I bought the book hoping to learn the secrets of how to build multi-window (NOT Multi-Document Interfaces aka "MDI") applications. Multi-window is where the application menus, dialogs and windows cause open other modal and non-moded dialog boxes and windows to open, and then manage their lifecycle until they are closed, like Microsoft Word, Powerpoint or Excel do well. These multi-window apps are the norm today for desktop apps. For example, selecting the "File... Open..." menu causes a standard FileOpen Dialog box to open.

This book does not explain how to launch and manage child windows or sibling windows. It assumes users will always be building all functionality into a single parent window, and that parent window will not be spawning any other windows or dialog boxes. Without these explanations in a lesson format, the book is incomplete and limited to toy programs or single-window GUI programs. Even Dropbox, which is written in Python spawns other windows, like the Dropbox Preferences dialog box... can launch the Sync dialog box.

I can easily build 1-window Python applications all day long with PyQt Builder's graphical layout tools, and then GENERATE all the source code. But the problem is that PyQt Builder applications are also simplistic 1-window, parent-window-only applications.

The book really needs supplemental material to show how to build for real-world desktop applications. I contacted the author in 2017 about these omissions. He said he didn't have time to do any more with the book. I am disappointed to see this re-published as "new" in 2018 because it has a new cover. Seems like a new cover on old content.

After these omissions are fixed, I'd change my rating from 3 stars to 4.5 or 5 stars.

 类似资料:

相关阅读

相关文章

相关问答