LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Pyqt vs pyside (https://www.linuxquestions.org/questions/programming-9/pyqt-vs-pyside-4175416436/)

Garda 07-12-2012 11:00 PM

Pyqt vs pyside
 
Hi,

I want to use the qt library for developing a GUI in python. I know some of the differences between these two bindings. Pyside is newer and I believe came to be for political and possibly also technical reasons.

Which of the two is the best choice and why?

Also, I am not aware of KDE4 python bindings that are based on pyside the way pykde4 is. Is that going to happen?

dugan 07-13-2012 05:46 PM

All else being equal, PySide has the nicer API.

PyQt has two versions of its API. Version 2 of its API is nicer and more Pythonic. However, for historical reasons and backward compatibility, version 1 is the default. Therefore, you end up starting all your PyQt modules with:

Code:

from sip import setapi
setapi("QDate", 2)
setapi("QDateTime", 2)
setapi("QTextStream", 2)
setapi("QTime", 2)
setapi("QVariant", 2)
setapi("QString", 2)
setapi("QUrl", 2)

PySide, on the other hand, offers only version 2 of the API.


All times are GMT -5. The time now is 05:44 AM.