you can use

class MyApp (QApplication):
     ....

if __name__ == '__main__':
    app = MyApp( sys.argv)
    if app.isRunning():
        ... do whatevr u want


On Mon, Jan 9, 2012 at 5:30 PM, Ricardo Viana <cgolhei...@gmail.com> wrote:

> Humm. It should. Check you have your naming right on the .ui for window
> widget.
>
> Best regards
> Ricardo Viana
>
> On Jan 9, 2012, at 11:56 AM, Panupat Chongstitwattana <panup...@gmail.com>
> wrote:
>
> Hi Kamil.
>
> Thanks for suggestion. But the cmds deleteUI/window modules can't seem to
> detect the PyQt window's titles :(
>
>
> On Mon, Jan 9, 2012 at 5:31 PM, Kamil Hepner <hektor1...@gmail.com> wrote:
>
>> It's very simple:
>>
>>
>> winName = "myWindow"
>> if pm.windows.window(winName, exists=True):
>>        pm.windows.deleteUI(winName)
>>
>>
>> 2012/1/9 Panupat Chongstitwattana <panup...@gmail.com>
>>
>>> In Maya 2010, if I run the script to start a UI that is already running,
>>> it would crash Maya D: How can I check if the UI is already running and
>>> close it?
>>>
>>> --
>>> 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
>>
>
>  --
> 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
>



-- 
--:: Kurian ::--

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