Hi Kurian,
this version works here, I didn't try the justin's one, but the concept
stays the same.
its a dummy function, if you need to do more, make a class.
import sip
from PyQt4.QtGui import QMainWindow
from PyQt4.QtGui import QWidget
import maya.cmds as cmds
from maya.OpenMayaUI import MQtUtil
def maya_window():
return sip.wrapinstance(long(MQtUtil.mainWindow()), QWidget)
def mk_view(name):
mw = QMainWindow(maya_window())
mw.setObjectName(name)
panel = cmds.modelPanel()
panel = sip.wrapinstance(long(MQtUtil.findControl(panel)), QWidget)
mw.setCentralWidget(panel)
mw.setWindowTitle(name)
mw.resize(1024, 800)
mw.update()
return mw
def main():
mk_view("MyNewWindow").show()
return 0
main()
hope that help !
jo
2011/11/21 Kurian O.S <[email protected]>
>
> # Error: 'parent' is not a Qt property or a signal
>
> # Traceback (most recent call last):
>
> # File "<maya console>", line 9, in <module>
>
> # File "<maya console>", line 14, in __init__
>
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe