PySide

PySide . It is one of the alternatives to programming GUI in Python , instead of using Tkinter which is used by Python. Other similar alternatives are PyGTK , PyQt, and wxPython . Like Qt , PySide is free software. PySide was released under the LGPL license in August 2009 by Nokia, 1 the ex-owners of the Qt tools, after Nokia failed in an agreement with PyQt developers, Riverbank Computing2 changed their license terms to include LGPL as an alternative license . PySide supports Linux / X11 ,Mac OS X , MeeGo , Windows and Maemo .

Summary

[ hide ]

  • 1 APIs
  • 2 Style of signals and slots
  • 3 Names of Tools
  • 4 Property names
  • 5 QThreads
  • 6 Converting PyQt code to PySide
  • 7 Conclusions
  • 8 Sources

APIs

When importing from write:

1 * from PySide.QtCore import * 2 * # or 3 * import PySide.QtCore

Signals and slots style

A simple definition is used like:

1 * QtCore.Signal = QtCore.pyqtSignal 2 * QtCore.Slot = QtCore.pyqtSlot

Tool Names

  • pyuic4 -> pyside-uic
  • pyrcc4 -> pyside-rcc
  • pylupdate4 -> pyside-lupdate

Property names

PySide uses connect and event on the QObject. Do not use these at all in the code, and when moving the code from PyQt check that it does not exist to avoid conflicts.

QThreads

In PySide, you must call the .wait () method of a thread after calling the .stop () method if you are going to exit the application. Otherwise, it may throw an exception that says: “QThread: Thread destroyed while still running. Segmentation fault ”.

Converting PyQt code to PySide

Pysider is a simple utility that converts PyQt4 code to PySide.

Conclusions

PySide contains many similarities with PyQt, its call structure, its construction of elements, connectors, signals, slots, it is practically the same idea in both. The most noticeable difference is in the type of license they handle. The LGPL (GNU Lesser General Public License) license, created by the Free Software Foundation (creator of the GPL in its various versions), in order to guarantee users the freedom to use and modify the software code to suit their needs, allowing it to be linked to a non-GPL program, which can be Free Software or proprietary Software. In this way, all software written with PySide, can be used and embedded in proprietary software without entering into licensing conflict, otherwise using PyQt and GPL,

 

Leave a Comment

Scroll to Top