But as far as beginner for GUI development using Qt is concerned I think this consideration should not be important.
Since atleast both PyQt4 and PySide does use Qt API 2.
However if you want to make a tool and sell it and at the same time you cannot afford to pay 350 pounds for PyQt4 commercial licence, to my understanding use PySide that is being distributed under LGPL.
- PySide (LGPL) allows linking from closed source software.
- PySide is still being updated and maintained, commercial support is available. With Nokia's future somewhat in question it is difficult to say what the future of PySide is.
- PyQt is still being developed and maintained, commercial support is available. I could be wrong, but I'm pretty sure its maintained by one guy - or at most a small consulting firm. They've got a good track record and don't appear to be going away any time soon. But, at the same time, lets hope he/they don't get hit by a bus.
- PySide is being actively developed, there seems to be community support.
- PyQt is being actively developed, and has a good + long track record.
Winner: PyQt - One could say PyQt has an advantage for activity - but if Nokia drops Qt, PyQt's might not have the upstream Qt supply to continue the project. It'll just get stale. If that even happens. Alternatively, PySide could just dry up someday and maybe nobody would maintain it.
- PySide is distributed under LGPL license
- PyQt is distributed under GPL license with an option for commercial support
Winner: PySide - LGPL trumps GPL for any business use. Not even a competition.
Both PyQt4 and PySide have very similar mappings to the Qt API. There are, however, some differences, my opinions on which are described below:
They are both well maintained. The PySide produces a lot more regular releases at the moment: I think it's more closely linked to Qt than PyQt4 and as a newer project has a more active community at the moment. However, that is just my impression and it may be wrong.
PyQt4 has the option of commercial support available (I don't know whether this is true for PySide or not).
PyQt4 is released under either a commercial licence or the GPL; PySide is released under the LGPL. For commercial applications, this is a significant difference.
APIs and Python versions PyQt4 supports two different APIs. API version 1 is the default for python 2.x applications and API version 2 is the default for python 3.x applications.
PySide only supports one API, which is roughly equivalent to PyQt4's API version 2. API version 2 (or the PySide API) is much nicer to work with than PyQt4's API version 1. In API version 1 you have a lot of code that casts python strings to QtCore.QStrings and back again. In API version 2 (and PySide) you just use python strings throughout. See below for a simple way of switching between PyQt4 and PySide if you want to play with both.
Most code I write seems to work equally well in PyQt4 and PySide. Historically, I had always used PyQt4 for python GUIs but most new stuff I write now uses PySide (mainly due to the more flexible licensing). I'd certainly recommend you try both and see how you find them. If you use QtVariant.py (below), switching between them is trivial and when you make a decision there will only be one file that needs updating.
Documentation The documentation for both PyQt4 and PySide are auto-generated from the main Qt documentation. In my opinion, the PySide documentation is a better representation of what you actually use, but in practice I tend to just use the Qt documentation anyway (it's quite easy to mentally translate the C++ documentation to python).
External Libraries If you're using external libraries, some do not work with PySide yet. There aren't many that you need to work with PySide to be honest, but a couple of years ago I wrote some code that used twisted (with the Qt reactor) and matplotlib and that forced me down the line of using PyQt4 rather than PySide. I think it's quite likely that these libraries will have been updated to support both by now, but I haven't checked.
Making Code work with either PyQt4 or PySide Assuming you're using python 2.x, you can fairly easily make your code compatible with both PySide and PyQt4 by making a QtVariant.py and using: