python - Maya 2015 PyQt AttributeError -


  import maya.OpenMaya PyQt4 import QtGui, QtCore, as omUI import sip UIC import Om import maya. as OpenMayaUI as Cmds RpIcons_rc import maya.mel import as maya.cmds mail DEF getMayaWindow (): # ptr = omUI.MQtUtil.mainWindow () return sip.wrapinstance (long (PTR) QtCore 'as an example QMainWindow Maya main window go '.QObject) def toQtObject (mayaName):' '' Given the name of Maya UI elements of any kind, relating QWidget or QAction lands. If the object does not exist, there is no return '' 'ptr = omUI.MQtUtil.findControl (mayaName) If ptr is not: ptr = omUI.MQtUtil.findLayout (mayaName) ptr if no: ptr = omUI.MQtUtil .findMenuItem (mayaName) If ptr No return sip.wrapinstance (long (PTR) QtCore.QObject) uiFile = ( 'D: /rpGUI.ui') form_class, base_class = uic.loadUiType (uiFile) class myUIClass ( form_class, base_class): def __init __ (self, parent = getMayaWindow ()): Super (myUIClass, self) .__ init __ (parent) self.setupUi (self) self.connectSignals () def connectSignals (self) #methods : All "Connect" UI Signals "Print" Connect Signals "Dia Rnuai (): Global app Global WAN app = Kyutigui. XAP Win = My Ulysses () Win Show (Error) RunUi ()  

Error on the code

Error: Attribute Error: File C: \ Program Files \ Autodesk \ Maya2015 \ Python \ lib \ Site-packages \ PyQt4 \ uic__init __. Py Line 215: There is no attribute in the 'modul e' object 'QMainWindow' #

Then tell me wht is going wrong ?? Thanks

Try using Piceide ship with May 2015 Piceide.


Comments

Popular posts from this blog

Active Directory Authenticated Proxy Server with Squid or CNTLM -

java - @PluginTarget(Node.class) not registering as neo4j plugin -

python - Calculate STD manually using Groupby Pandas DataFrame -