#!/usr/bin/env python import PySimpleGUIQt as sg import sys # This bit gets the taskbar icon working properly in Windows if sys. Let's try it out! Here's a basic program, where the icon doesn't load in the taskbar in Win 10: See MSDN documentation for AppUserModelIDs. Alternatively, you can add a registry key to tell Windows that Pythonw.exe is just a host rather than an application in its own right. Perhaps a future release of Python will do this. The correct solution is for Pythonw.exe to tell Windows that it is merely hosting other applications. Windows uses various heuristics to decide whether different instances should be grouped or not, and in this case it decided that everything hosted by Pythonw.exe should be grouped under the icon for Pythonw.exe. For example, if you have several different instances of your application running, and each instance has its own icon, then they will all be grouped under a single taskbar icon. In Windows 7, the taskbar is not for "Application Windows" per se, it's for "Application User Models". The explanation for the problem is interesting: I've found a slightly better workaround at Stack Overflow. > Reply to this email directly, view it on GitHubĪbsolute paths create problems with code portability, so it's not quite a real solution for me (not to mention it also didn't fix the issue on my machine). > You are receiving this because you authored the thread. > Currently I'm having his exact same problem, I get the icon in the window > if someone else has the same problem, they'll see what they can do. If you find a solution, please come back and post it so that > happy to re-open it if you find that there's something PySimpleGUI is doing > I'm going to close this as it sounds specific to your machine. No one else has reported this (ever that I can If both tkinter and Qt have the same problem, that pretty much > Definitely a local problem with windows if I'm reading your responses Restarted pycharm and tested it again and it worked. Then I tried it in PySide2 and it worked. Installed PyQt5 and ran the same script and I got window icon and button Getting window icon and button icon, still no taskbar icon. Been messing with it today in PySide2 and I wasn't This pre-formatted code block is all set for you to paste in your bit of code:įunny you mention that. Help me help you by providing something that can be executed so that work on getting you a fix or a workaround can immediately begin. Yes, it is a pain to narrow down problems, but it's part of the debugging process. instead paste your 10 line program in full). please don't paste a link to your 400 line program. Code To DuplicateĪ short program that isolates and demonstrates the problem (i.e. What do I need to set/change for "application icon" or windows taskbar icon? I only see default python logo. Searched through Issues (open and closed) to see if already reportedĭescription of Problem / Question / Details.Run your program outside of your debugger (from a command line).Note that there are also Demo Programs under each port on GitHub.Looked for Demo Programs that are similar to your goal.Searched through the readme for your specific port if not PySimpleGUI (Qt, WX, Remi).Searched through main docs for your problem.Read instructions on how to file an Issue.Tkinter, pyside2, pyqt5, kivy You have completed these steps: _ yes Have used another Python GUI Framework (tkiner, Qt, etc) previously (yes/no is fine)? version) Your Experience Levels In Months or Years
0 Comments
Leave a Reply. |