[PyQt] Anyone know how to programatically assigna file type icon on windows?

Luna Tuna fruitfulapproach at gmail.com
Wed May 8 03:56:49 BST 2019


I followed the canonical instructions here:

https://docs.microsoft.com/en-us/windows/desktop/shell/how-to-assign-a-custom-icon-to-a-file-type


I manually edited the registry to achieve this:
[image: image.png]

And I called this in my app's main function:

from win32com.shell import shell,
shellconshell.SHChangeNotify(shellcon.SHCNE_ASSOCCHANGED,
shellcon.SHCNF_IDLIST, None, None)

Did nothing!

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190507/fcc92ff7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 282754 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190507/fcc92ff7/attachment-0001.png>


More information about the PyQt mailing list