Hey there,

You didn't specify if you were actually using PyQt or not. I'm going to assume 
you want to just use Qt Designer,
and then be able to add your modelPanel to the window. There really isnt much 
different from creating this purely in the maya ui commands.

win = cmds.loadUI(f="windowTest.ui")
cmds.setParent(win)
cmds.paneLayout()
m = cmds.modelPanel()
cmds.modelPanel(m, e=True, cam="myCamera")
cmds.showWindow( win )
cmds.refresh(f=True)

In my "windowTest.ui" file, I simply created a dialog with nothing in it. And I 
have a camera in my scene called "myCamera"
Sometimes the new maya ui kinda lags in refreshing itself, so you would have to 
interact with the new dialog sometimes to
get the camera to redraw. 

Are you trying to do this via PyQt? That would have a few more steps since you 
need to translate between maya node paths and actual Qt widgets.

-- justin



On Nov 20, 2011, at 9:08 AM, 宇 wrote:

> I want to embed a maya's modelPanel to a Qt's Layout, but i don't know
> how?
> I just know you can create a window and layouts in QtDesigner and
> create the buttons or other controls with coding by PyQt.
> But if i want to create a modelPanel with my own camera embed to the
> widow created by qt, how?
> My english is not good, if you know what i mean, please give me an
> answer .
> 
> -- 
> view archives: http://groups.google.com/group/python_inside_maya
> change your subscription settings: 
> http://groups.google.com/group/python_inside_maya/subscribe

-- 
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