Skip to content

Instantly share code, notes, and snippets.

@ross-g
Created March 19, 2018 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ross-g/203a626bf4e5b48b37f9d37e60d623dc to your computer and use it in GitHub Desktop.
Save ross-g/203a626bf4e5b48b37f9d37e60d623dc to your computer and use it in GitHub Desktop.
Maya Pyside import for compatibility across versions
try:
from PySide2 import QtCore, QtGui, QtWidgets
from shiboken2 import wrapInstance
except ImportError:
from PySide import QtCore, QtGui
from PySide import QtGui as QtWidgets
from shiboken import wrapInstance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment