online store
top of page
Writer's pictureAlex

PySide 2 vs PySide 6

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.

Comments


bottom of page