Although the examples work fine with both Python 2.5 and Python 2.6, I've created Python 2.6–specific versions that take some advantage of Python 2.6's Python 3–like features. The code is available in two formats, pyqtbook26.tar.gz (720K suitable for any platform), and pyqtbook26.zip (926K Windows line endings) [updated 2011-06-20
pyqtbook26.rar pyqtbook26.tar.tar.rar (720 K) 下载次数:26 ]. These examples have been tested on Linux with Python 2.6 and PyQt 4.4-4.6. There are also two new versions, pyqtbook27.tar.gz (720K suitable for any platform), and pyqtbook27.zip (933K Windows line endings) [updated 2014-05-06
pyqtbook27.rar pyqtbook27.tar.tar.rar (720 K) 下载次数:117 ]—these use the ‟new” nicer signal-slot and emit syntaxes introduced by PyQt 4.5, but are untested.
Mac users please note that PyQt does not seem to be buildable with Python 2.6 on Mac OS X, at least not for me and for some readers in the summer of 2009, so Mac users are recommended to use Python 2.5, or maybe try Python 3! (I have now heard from one reader who has successfully got PyQt working with Python 2.6 on his Mac. Essentially what he did was to change the /usr/locale/Qt4.6/mkspecs/default symbolic link to point directly to the compiler rather than Xcode—in his case to macx-g++40. In fact, since he was on a PowerPC rather than an x86-based Mac he also had to modify the qconfig.pri file's QT_CONFIG statement to remove x86. He then unpacked the PyQt Mac tarball and did the usual installation process and it worked. I haven't tried this myself and don't plan to—I'm switching exclusively to using Python 3 now.)
下载时候注意,链接在文字描述中。