<div dir="ltr"><div>Instead of relying on arbitrary delays, you may consider installing an event filter on the target window and wait for <span style="font-family:monospace">QEvent.Type.Show</span>, which should be safe enough. Once that's received the first time, you can remove the event filter and start querying the capturable windows.<br><br></div><div>Regards,</div><div>MaurizioB<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 23 feb 2024 alle ore 21:11 Jason Hallen <<a href="mailto:hallenj@gmail.com">hallenj@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thanks for the suggestion, Vincent. I was able to figure out the problem. My code was calling the QWindowCapture.capturableWindows() list before the main PyQt window was fully shown. That's why "TESTING TESTING" wasn't on the list. The solution was to call QWindowCapture.capturableWindows() at a later point (within a second even) once the window was shown. Then "TESTING TESTING" appears in the list and I can capture it.</div><div><br></div><div>You're correct that "TESTING TESTING" is not an identifier, but the .description() attribute of the QCapturableWindow (which is basically the window title) is a convenient way of finding my window. </div><div><br></div><div>Thanks,</div><div>Jason<br></div><div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 23, 2024 at 12:02 PM Vincent Vande Vyvre <<a href="mailto:vincent.vande.vyvre@telenet.be" target="_blank">vincent.vande.vyvre@telenet.be</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 22/02/24 23:50, Jason Hallen wrote:<br>
The window's title "Testing Testing" is not an identifier.<br>
I suspect the widget you're searching for is the:<br>
> 12 - anim.py — anim - <PyQt6.QtMultimedia.QCapturableWindow object at <br>
> 0x1034f6ea0><br>
<br>
<br>
Vincent<br>
<br>
<br>
</blockquote></div>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">È difficile avere una convinzione precisa quando si parla delle ragioni del cuore. - "Sostiene Pereira", Antonio Tabucchi<br><a href="http://www.jidesk.net" target="_blank">http://www.jidesk.net</a></div>