Hey guys,
------------------------------

here is a link to my recipe for this
<https://gist.github.com/timmwagener/a0051f64aac577c4fd0a02d16ad5716c>. I
like to specifically subclass a QWidget to search it’s type name in all
widgets and kill all matches before the new instance is created. The reason
I’m not comparing identity is that I found this can fail in the face of
reload() activities.

*Cheers,*
*Timm*
​

On Tue, Jun 7, 2016 at 10:08 PM, Fredrik Averpil <fredrik.aver...@gmail.com>
wrote:

> Is it a pop-up QDialog?
>
> Is it parented to the QApplication when created?
>
> If yes and yes you should be able to get the children of the QApplication,
> loop over them until you find matching object name or title and then close
> it or do whatever you want to do when existing dialog is found.
>
> Hehe, that’s *exactly* what I tried to do (recursive search), but I
> couldn’t see the object name being returned. It was a QWidget, parented to
> QApplication.activeWindow().
>
> One simple way to do this is to keep a reference to your UI instance
>
> Thanks Nathan, I’ll try that.
>
> // Fredrik
> ​
>
> _______________________________________________
> Nuke-python mailing list
> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>


-- 
*Timm Wagener*
*Technical Director Pipeline & Lighting/Shading*
*www.timmwagener.com <http://www.timmwagener.com> | **wagenert...@gmail.com
<wagenert...@gmail.com> | Phone: *0160-99298540
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to