I have a small application on Python with PyQt6.
Trying to set an icon with
app.setWindowIcon(QIcon('uiapp.ico'))
without any success. It sets window icon but the taskbar icon remains unchanged.
I also tried adding
import ctypes
myappid = 'mycompany.myproduct.subproduct.version' # arbitrary string
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
from this answer, but this did not help as well.
Also I tried png icon with no success.
Icon size is 128×128. I am using Windows 11 23H2, Python 3.10.11, PyQt 6.7.0.
Running application in Poetry 1.8.3 venv if this does matter.