Post your latest code? Maybe you have a strange indent. No idea why the
closeEvent would happen right away unless maybe you are letting it get
garbage collected immediately.


On Sun, Apr 22, 2012 at 3:51 PM, Christopher Evans <[email protected]>wrote:

> If I pipe that 'name' into the 'p' parent flag of the sciptjob, it
> lives on after i close the window.  Second, integrating your code, the
> closeEvent runs at the time I execute the script and the window opens
> (weird?) it doesn't run on close.
>
> On Sat, Apr 21, 2012 at 5:16 AM, John Patrick <[email protected]> wrote:
> > You need to set the object name to be able to find it in Maya:
> > http://pastebin.com/T4tJ4GjE
> >
> >
> > On Fri, Apr 20, 2012 at 5:56 PM, Christopher Evans <
> [email protected]>
> > wrote:
> >>
> >> class skinWrangler(QtGui.QMainWindow):
> >>    def __init__(self):
> >>                QtGui.QMainWindow.__init__(self)
> >>
> >> Looks like I am creating the window differently than you guys.
> >>
> >> I was going to give this skinning tool away free anyways, here's that
> >> few surrounding chunks of code: http://pastebin.com/5tJfvSB7
> >>
> >> Thanks,
> >>
> >> CE
> >>
> >> On Sat, Apr 21, 2012 at 2:06 AM, Justin Israel <[email protected]>
> >> wrote:
> >> > I hit send to fast. Ignore that silly line at the end of my last
> message
> >> > :-)
> >> >
> >> >
> >> > On Fri, Apr 20, 2012 at 5:05 PM, Justin Israel <
> [email protected]>
> >> > wrote:
> >> >>
> >> >> On Fri, Apr 20, 2012 at 4:25 PM, Christopher Evans
> >> >> <[email protected]>
> >> >> wrote:
> >> >>>
> >> >>> First lemme start with: Is it possible to use closeEvent() in Maya?
> I
> >> >>> cannot get that to work.
> >> >>
> >> >>
> >> >> Can you be more specific about what is giving you trouble?
> >> >> This works just fine:
> >> >>
> >> >> class Window(QtGui.QMainWindow):
> >> >>     def closeEvent(self, e):
> >> >>         print "HIT"
> >> >>
> >> >>>
> >> >>>
> >> >>> Can someone tell me how to feed a custom pyqt mainWindow tool into
> the
> >> >>> parent flag of a scriptjob?
> >> >>>
> >> >>>
> >> >>> I have been looking all over teh internets, I think it involves SIP
> >> >>> somehow.. all examples I have seen show QDialog, or mel/python
> >> >>> commands UIs.
> >> >>
> >> >>
> >> >> The part about getting the maya UI name from a pyqt widget has been
> >> >> asked
> >> >> before.
> >> >> It goes like this:
> >> >>
> >> >> import sip
> >> >> import maya.OpenMayaUI as mui
> >> >>
> >> >> win = # some PyQt widget
> >> >> mayaName = mui.MQtUtil.fullName(long(sip.unwrapinstance(win)))
> >> >>
> >> >> You can also check out
> >> >>>
> >> >>>
> >> >>> Thanks,
> >> >>>
> >> >>> --
> >> >>> CE
> >> >>>
> >> >>> --
> >> >>> 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
> >>
> >>
> >>
> >> --
> >> CE
> >>
> >> --
> >> view archives: http://groups.google.com/group/python_inside_maya
> >> change your subscription settings:
> >> http://groups.google.com/group/python_inside_maya/subscribe
> >
> >
> >
> >
> > --
> > John Patrick
> > 404-242-2675
> > [email protected]
> > http://www.canyourigit.com
> >
> > --
> > view archives: http://groups.google.com/group/python_inside_maya
> > change your subscription settings:
> > http://groups.google.com/group/python_inside_maya/subscribe
>
>
>
> --
> CE
>
> --
> 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