I don't know if we can share some files in PM but I could send you a basic tray app that I have done based in a big part with the system tray tutorial. I understand very well what you are living with your IDE because I lived it too. Since Martin's tutorials, I also use Qt Creator which is really great and complementary to Pycharm. Pycharm is really a great IDE done in Java (search the error) for Python (and Django too but not with the community version). I have keep Pycharm and remove Spyder and Eric6. In the past, I have used Spyder and Eric6, Pycharm. It could be Windows hiding all the icons together you're right. If you quit the command window it was launched from the process is sill going for a while, so it will take a bit longer. How long does the icon hang around after you quit? If it's via the "Quit" menu icon it should be fairly quick (a few seconds). Then I was left clicking instead of right clicking when I tried the other code. That was what caused a large amount of my problems earlier. Thank you for adding the "quit" button - before I was having trouble getting it to stop running because Spyder doesn't always respond to break commands. The code from Stack Overflow works now too. I also didn't pick up on the fact that I was supposed to right click on it, not left click. Maybe that is what happened before - it ran but the system tray put it with the hidden icons. Normally when I close something in the system tray, the icon disappears. Then I can "quit" and the code stops but the icon is still there. Other times it shows up, but in the hidden icons - I have to expand my system tray to see it. Sometimes when I run it, the icon shows up and it works fine. This problem may be related to my software - Spyder is behaving strangely. The icon shows up in the system tray, and I can right click on it to access the dropdown. However now when I run it, your code is working - sort of. The icon was in the same folder, and it still didn't work. You could of course use the built-in icons we discovered recently. The code as-is expects the icon.png to be in the same folder as the script. I did notice though that when I didn't have the icon available it wouldn't show anything in the system tray. Hey I have just tested the example now on Windows 10 and it works fine for me. Just to add, I have been able to get an icon to appear using an example from stackoverflow but unfortunately nothing happens and the program just keeps running because I can't exit.įrom PyQt5 import QtWidgets, QtCore, QtGuiĬlass SystemTrayIcon(QtWidgets.QSystemTrayIcon): Other examples from other sites also have this issue. Please can you help me to get this running? I have searched online and haven't found a solution yet. The icons are not showing up anywhere that I can see. I have to force the programs to stop executing. When I run the two example code blocks in the tutorial, nothing happens.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |