top of page

Python for Maya: March 30 · 19 spots left · Enroll Now

PySide 2 vs PySide 6

  • Writer: Alex
    Alex
  • Jul 23, 2024
  • 2 min read

We will soon be moving from PySide 2 to PySide 6. The transition is mostly trivial and often just involves changing the import from PySide2 to PySide6.



A simple way to keep your code valid for both PySide versions is the following snippet we use in our masterclasses:

try:    # older DCC versions
    from PySide2 import QtWidgets, QtGui, QtUiTools
except: # newer DCC versions
    from PySide6 import QtWidgets, QtGui, QtUiTools

It will try to import PySide 2 if this doesn't work because PySide 2 isn't supported anymore it will switch to PySide 6 instead. Most of the code especially on the beginner level is the same between the versions.


PySide 6 will be used in the following future DCC releases:


Read more about the transition from PySide 2 to PySide 6.



Python Advanced uses Qt.py, which is version independent of PySide and PyQt:

from Qt import QtWidgets, QtGui, QtCore, QtCompat


PySide for Python for Maya & Nuke

I've just added 1 hour of additional footage for Python for Maya and Nuke teaching how to create UIs with PySide. Now all Python masterclasses share an understanding of PySide while Python for Maya and Python for Nuke still have the option to use the simpler native UI. It's a basic PySide introduction, we'll dive deeper into PySide in Python Advanced.


  • Python for Maya: PySide opens up new UI features for the moderate Maya UI.

  • Python for Nuke: The Nuke UI is very limited knowing basics about PySide allows us to write more moderate applications.


If you're already enrolled this is a free update.

If you're thinking about enrolling: It's the best time to learn Python and PySide.

2 Comments


worktolead645
3 days ago

This is a helpful comparison for developers trying to understand the differences between PySide 2 and PySide 6 before deciding which version to use. I particularly like comparison articles that explain practical considerations instead of simply listing features. Developers building web-based utilities may also find an online font generator useful when creating simple tools where users can experiment with different text styles directly in the browser.

Like

xin wang
xin wang
May 21

Really enjoyed reading "PySide 2 vs PySide 6", and a few points were immediately actionable for me. Appreciate you publishing this. split image in 6

Like
bottom of page