>
> Btw, not that I think you are doing this anyways but though it is worth
> mentioning... that part at the bottom of your python ui module (in the
> __main__) block is only meant for standalone (outside of Maya) apps. You
> shouldn't be creating a QApplication anywhere.
>
> Thanks, i didn't notice that, its auto-generation after converted from UI
file.

And yes, if i just call out the UI file, everything is fine, both 2011 and
2012. But if i try to insert a Maya's UI element (i tested  on 2012 ) , it
crash right away . It only happens with my UI file, the example you gave me
is fine, no crash, and the Maya UI parented to QtUI.

So after i subclass UI file, this is what i do next

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

#Call out UI
b = CModifyWUI.CModifyUI(parent = CModifyWUI.getMainWindow())
b.show()
# its an emty HBoxLayout i save for insert element later
layout_pointer = long(sip.unwrapinstance(b.Color_HLayout))
path = mui.MQtUtil.fullName(layout_pointer)
button = cmds.button(parent = path)

:(

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].


Attachment: CModifyWUI.py
Description: Binary data

Reply via email to