On Tue, Feb 16, 2016 at 6:27 PM Mahmoodreza Aarabi <madoo...@gmail.com>
wrote:

> Hey man i suggest that use this method for running your window in maya:
>
> class YourClass():
>     ....
> def getMainWindow():
>     mainWindow = QtGui.QApplication.activeWindow()
>     while True:
>         lastWin = mainWindow.parent()
>         if lastWin:
>             mainWindow = lastWin
>         else:
>             break
>     return mainWindow
> def show():
>         win = YourClass(parent=getMainWindow())
>         win.show()
>
> Is it actually reliable to be trusting the results of activeWindow() to
find the main window? What if the active window isn't parented to Maya?


> about your menu, just i can say put path of userSetup.py in your
> PYTHONPATH
>
> On Tue, Feb 16, 2016 at 5:41 AM, Eric Thivierge <ethivie...@gmail.com>
> wrote:
>
>> This rings a bell that I dealt with a few weeks back. I can't find any
>> emails or messages with a quick search but I believe there was some command
>> in maya in reference to the menus, where you have to pass *args, **kwargs
>> and it get's things working. Forget where though.
>>
>> --------------------------------------------
>> Eric Thivierge
>> http://www.ethivierge.com
>>
>> On Mon, Feb 15, 2016 at 6:00 PM, md <accou...@mdonovan.com> wrote:
>>
>>> its getting called at the bottom of the script below the class ...
>>>
>>> if __name__ == "__main__":
>>>
>>>
>>>     try:
>>>         test_ui.deleteLater()
>>>     except:
>>>         pass
>>>
>>>     test_ui = smRealCameras()
>>>
>>>     try:
>>>         test_ui.create()
>>>         test_ui.show()
>>>     except:
>>>         test_ui.deleteLater()
>>>         traceback.print_exc()
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Python Programming for Autodesk Maya" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to python_inside_maya+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/a1e2f96e-28d7-4f94-ba28-89de6d477591%40googlegroups.com
>>> <https://groups.google.com/d/msgid/python_inside_maya/a1e2f96e-28d7-4f94-ba28-89de6d477591%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to python_inside_maya+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CAAjrnHvMC8CzxmiTzC94fDb9%3DMtOTidLpMPwx%3DExeK4pJSW_Xw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/python_inside_maya/CAAjrnHvMC8CzxmiTzC94fDb9%3DMtOTidLpMPwx%3DExeK4pJSW_Xw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
>
> Bests,
> madoodia
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CADvbQwJSg-J5ZNxP-FOiDBW08RmVQ4XjU%2B8C1ZwGhr-iVh7RZA%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CADvbQwJSg-J5ZNxP-FOiDBW08RmVQ4XjU%2B8C1ZwGhr-iVh7RZA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2t4keg2fLVHFfp1Z6cd%3DOv5HB6J2XebFBAVT1bgC%2BQKQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to