Re: python deiconify and show is not working with threading
On 2013-10-18 07:17, Peter Irbizon wrote:
> please in function topko there are deiconify() and show() in my code but
> it will not show my window. Please how can should I change it?
From the import of _winreg I can tell you're working on Windows.
On Windows, you cannot interact with gtk widgets from a background
thread. It will just lock up your app, or not work in other ways. This
is caused by the underlying win32 "HWND" belonging to the main thread;
operating on it from another thread needs to be done differently and
carefully and GTK (rightly IMO) doesn't try to do that for you.
The best way to fix this is to do everything GTK-related in the main
thread. The easiest way to do that is via glib.idle_add().
# put code here that interacts with the UI