I'm trying to write a small email checking client which will pop up a window in the lower right corner when there's new mail, and where the window will go away when it is clicked on.
- Code: Select all
So NotifyWindow is just a QWidget containing a single button which holds the text I want to display. When I test it out in the shell, it displays and vanishes when it should, with the text it should. keep_checking_gmail does what its name suggests, and it tells the NotifyWindow when and what to display. When I run this main method, it all seems to work correctly until it actually gets its first new email registered, then the NotifyWindow tries to show up, but never actually gets painted to the screen (it's all white) and I get an hourglass when I hover the pointer over the NotifyWindow. This continues (with the thread still chugging along in the background) until I kill the process or the program simply exits without an error message.
While I don't really know where in my code the problem is, I'm displaying the main method since that's almost the only thing that's run outside of the keep_checking_gmail function. Any help would be appreciated.
I'm using PyQt5 for Python 3.3 and Windows 7.
Note: I am terrible at GUI programming in any language. Please forgive me if this is a really stupid error on my part.