Hello Justin,

I had little bit of confusion in the example code of template for PyQt app 
for maya , Since i am also referring the Maya Python 
Book<http://www.maya-python.com/>
,
in which they make window class that inherits QtGui.QMainWindow while the 
one in your code the window class inherits QtGui.QtDialogs

from PyQt4 import QtCore,QtGui
import SIP

import maya.cmds as cmds
import maya.OpenMayaUI as mui

def getMayaMainWindow(QtGui.QMainWindow):
    accessMainWindow=mui.MQUtil.mainWindow()
    return sip.wrapinstance(long(accessMainWindow),QtCore.QObject)

class Window(*QtGui.QMainWindow*):
    def __init__(self,parent=getMayaMainWindow(),
                 uniqueHandle='PyQtWindow'):
        QtGui.QMainWindow.__init__(self.parent)
        self.setWindowTitle('PyQtWindow')
        self.setObjectName(uniqueHandle)
        self.resize(400,200)
        self.setWindow()
    def setWindow(self):
        #add PyQt window congtrols here in inherited class
        pass
    
while in case of your example given in PyQt tutorial.

class Window(*QtGui.QDialog*):
    def __init__(self,*args,**kwargs):
        super(Window,self).__init__(*args,**kwargs)
        # custom code here
        self.resize(800,600)

##everything else is same 

-- 
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings: 
http://groups.google.com/group/python_inside_maya/subscribe

Reply via email to