You need a shiboken-based type
问题 When i run the code i get the following error line 11: You need a shiboken-based type. Not sure what i am doing wrong here . When i run just the GetMayaWindow() its runs properly but when run it in init its gives me error import shiboken from PySide import QtGui import maya.OpenMayaUI as apiUI from cStringIO import StringIO import pysideuic import xml.etree.ElementTree as xml def GetMayaWindow(): ptr = apiUI.MQtUtil.mainWindow() if ptr is not None: return shiboken.wrapInstance(long(ptr),QtGui