My GUI Freezing

Hi Everyone,

Please Help me !
I designed gui for steaming vdo from drone when i click connect button the GUI hang like vdo.
How can i solve it. Thank you.

Vdo:
Recording 2023-03-22 113359.mp4

Code:
https://paste.ofcode.org/bqAbBycTd3euWFy9Y4VsyF

The code link isn’t showing anything – can you post the code here?

Usually when the UI freezes it means you’re doing something which is taking too long & not handing control back to the event loop. In that case you’ll usually want to look at threads for handling the long-running tasks.