Featured image of post PySide and PyQt vs Other Python GUI Frameworks

PySide and PyQt vs Other Python GUI Frameworks

Read if you are trying to decide PySide, PyQt between kinter, Kivy, and wxPython

PySide and PyQt vs Other Python GUI Frameworks

I found a great video on youtube - that goes more in depth.. with visual examples!

kinter, Kivy, and wxPython

below is more of a cheat sheet of collected info to help you (and me :) ) decide

Overview of Python GUI Frameworks

FrameworkLicensingBest ForLearning CurveCross-Platform
PyQtGPL/CommercialFeature-rich, professional appsModerateYes
PySideLGPLFeature-rich, Qt-based appsModerateYes
TkinterBuilt-in (Tcl/Tk)Simple desktop appsEasyYes
KivyMITMobile & touch-friendly appsSteepYes
wxPythonLGPLNative look-and-feel appsModerateYes
PySimpleGUI- Simplifies GUI development- Wraps Tkinter, Qt, WxPython- Limited flexibility compared to full frameworksQuick prototypes, simple UIs
PySimpleGUI- Simplifies GUI development- Wraps Tkinter, Qt, WxPython- Limited flexibility compared to full frameworksQuick prototypes, simple UIs

PySide and PyQt: The Power Duo

PySide and PyQt are both bindings for the Qt framework, providing a rich set of widgets, styling options, and cross-platform capabilities.

Why Choose PySide or PyQt?

  • You need a professional-looking UI with modern widgets.
  • You want a stable framework that works across Windows, Mac, and Linux.
  • You want to use Qt Designer to visually design your UI.
  • You need advanced features like signals, slots, and animations.

Key Differences Between PyQt and PySide

FeaturePyQtPySide
LicenseGPL (or commercial)LGPL
MaintainerRiverbank ComputingThe Qt Company
API NamingSome differencesCloser to C++ Qt API
Community SupportLargerGrowing

Good link on the licensing issues with PyQt and PySide
https://www.pythonguis.com/faq/pyqt-vs-pyside/

How PySide and PyQt Compare to Other Frameworks

Tkinter: The Built-in Choice

Tkinter comes pre-installed with Python and is great for simple desktop applications. It has a basic widget set but lacks the modern look and feel of Qt-based frameworks.

Use Tkinter if:

  • You want a quick and easy way to build simple GUIs.
  • You don’t need advanced UI elements.
  • You prefer a lightweight solution.

Kivy: The Mobile-Friendly Framework

Kivy is focused on touch interfaces and is great for mobile and multi-touch applications. However, it has a steeper learning curve and is not ideal for traditional desktop applications.

Use Kivy if:

  • You need to build a cross-platform mobile app.
  • You want to use multi-touch gestures.
  • You don’t mind a non-native look.

wxPython: The Native Look-and-Feel Option

wxPython is another solid option that provides native-looking applications across platforms. It’s a bit less popular than PyQt/PySide but can be a great choice for lightweight applications.

Use wxPython if:

  • You need an app that looks and feels native on each OS.
  • You prefer a simpler licensing model than PyQt.

Side By Side

LibraryProsConsBest For
Tkinter- Built-in with Python
- Simple to use
- Lightweight
- Basic UI elements
- Outdated look
- Limited styling
Small, simple applications & beginners
PyQt- Feature-rich
- Professional look
- Cross-platform
- Strong documentation
- Learning curve
- GPL/commercial license issues
Complex applications, professional software
PySide- Similar to PyQt but LGPL license
- Feature-rich
- Less community support than PyQtAlternative to PyQt with LGPL licensing
Kivy- Supports mobile and touch-based UIs
- Modern look
- Not native-looking on desktop
- Can be tricky to style
Mobile apps, multi-touch interfaces
wxPython- Native look & feel
- Cross-platform
- Good documentation
- API complexity
- Not as widely used as PyQt/PySide
Desktop applications needing native UI

PySide and PyQt Compared

HAHAH!! can you spot the differences?**

PyQt Code Sample

1
2
3
4
5
6
7
8
9
from PyQt6.QtWidgets import QApplication, QLabel, QWidget
import sys

app = QApplication(sys.argv)
window = QWidget()
window.setWindowTitle("PyQt Example")
label = QLabel("Hello, PyQt!", parent=window)
window.show()
sys.exit(app.exec())

PySide Code Sample

1
2
3
4
5
6
7
8
9
from PySide6.QtWidgets import QApplication, QLabel, QWidget
import sys

app = QApplication(sys.argv)
window = QWidget()
window.setWindowTitle("PySide Example")
label = QLabel("Hello, PySide!", parent=window)
window.show()
sys.exit(app.exec())

How PySide and PyQt Compare to Other Frameworks

Tkinter: The Built-in Choice

Tkinter comes pre-installed with Python and is gear to simple desktop applications.

It has a basic widget set but lacks the modern look and feel of Qt-based frameworks.

Use Tkinter if:

  • You want a quick and easy way to build simple GUIs.
  • You don’t need advanced UI elements.
  • You prefer a lightweight solution.

Tkinter Code Sample

1
2
3
4
5
6
7
import tkinter as tk

root = tk.Tk()
root.title("Tkinter Example")
label = tk.Label(root, text="Hello, Tkinter!")
label.pack()
root.mainloop()

Kivy: The Mobile-Friendly Framework

Kivy is focused on touch interfaces. ala iPhone and Android.
However, humans on the interwebs seem to complain it has a steeper learning curve .

Use Kivy if:

  • You need to build a cross-platform mobile app.
  • You want to use multi-touch gestures.
  • You don’t mind a non-native look.

Kivy Code Sample

1
2
3
4
5
6
7
8
from kivy.app import App
from kivy.uix.label import Label

class MyApp(App):
    def build(self):
        return Label(text="Hello, Kivy!")

MyApp().run()

wxPython: The Native Look-and-Feel Option

wxPython is another solid option that provides native-looking applications across platforms. It’s a bit less popular than PyQt/PySide but can be a great choice for lightweight applications.

Use wxPython if:

  • You need an app that looks and feels native on each OS.
  • You prefer a simpler licensing model than PyQt.

wxPython Code Sample

1
2
3
4
5
6
7
8
import wx

app = wx.App()
frame = wx.Frame(None, title="wxPython Example")
panel = wx.Panel(frame)
text = wx.StaticText(panel, label="Hello, wxPython!", pos=(10,10))
frame.Show()
app.MainLoop()

Yes, you can use PyQt for an internal application within your company without selling it, but there’s a licensing detail you need to be aware of:

The confusing Licensing situation with PyQt and Pyside

PyQt Licensing

  • PyQt is dual-licensed:
  • *GPL (General Public License)Free, but you must open-source your code if you distribute the app outside your company.
  • . Commercial License – Required if you want to keep your code proprietary and distribute it outside your company.

PySide Licensing

  • PySide is licensed under LGPL (Lesser General Public License).
  • This means you can use it for free, even in commercial and closed-source applications, as long as you dynamically link against the Qt libraries.
  • Unlike PyQt (which has a GPL license that requires you to open-source your code unless you buy a license), PySide allows proprietary software without needing a commercial license.

When Might You Need a Commercial License for Qt?

  1. If you statically link Qt instead of dynamically linking it (LGPL requires dynamic linking).
  2. If you use certain Qt commercial-only modules (e.g., some enterprise features).
  3. If you want official support from The Qt Company