title: You need a shiboken-based type
body: <p>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 <strong>init</strong> its gives me error  </p>
  
  <pre><code>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.QMainWindow)
  
  def LoadUiType(ui_file):
      parsed = xml.parse(ui_file)
      widget_class = parsed.find('widget').get('class')
      form_class = parsed.find('class').text
      with open(ui_file,'r') as f:
          o = StringIO()
          frame = {}
  
          pysideuic.compileUi(f,o,indent = 0)
          pyc = compile(o.getvalue(),'&lt;string&gt;','exec')
          exec pyc in frame
  
          form_class = frame ['Ui_{0}'.format(form_class)]
          base_class = eval('QtGui.{0}'.format(widget_class))
  
      return form_class,base_class
  
  import shiboken
  from PyQt4 import QtGui,QtCore,uic
  from pymel.core import *
  import pymel.core as pm
  from pymel import *
  
  ui_file = "D:/Swapnil/Workspace/R&amp;D/modellingTools/ModellingTools.ui"
  list_form,list_base = LoadUiType(ui_file)
  
  class ModellingToolsUI(list_form,list_base):
      def __init__(self, parent =GetMayaWindow()):
          self.window_name = 'modellingTools'
  
          if window(self.window_name,exists = True ):
              deleteUI (seld.window_name)
  
          super(ModellingToolsUI,self).__init__(parent)
          self.setupUi(self)
  
  
  def run_plugin():
      ex = ModellingToolsUI()
      ex.show()
  </code></pre>