1

Having a PYSide6 app with icons defined:

    self.window.setWindowIcon(QIcon("icons/icon.ico"))
    app.setWindowIcon(QIcon("icons/icon.ico"))

The icons show up almost everywhere, in the top bar of the window, the taskbar in windows etc. Just the icon in the file explorer is missing:

enter image description here

Any idea where to add this?

I tried adding different arguments to the build command like --icon which is not recognized by pyside6-deploy and also adding an entry to the pysidedeply.spec didn't change anything.

  • pyside6-deploy is based on Nuitka, you should look for command line options in its documentation. – musicamante Aug 03 '23 at 15:58
  • Use the ```nuitka``` parameter of the pyside6-deploy spec file and the ```--windows-icon-from-ico``` option of Nuitka. See [Nuitka User Manual - Tweaks - Icons](https://nuitka.net/doc/user-manual.html#icons). – relent95 Aug 04 '23 at 02:45

1 Answers1

0

Thanks for the comments, it lead me to the right answer:

I used in the pysidedeploy.spec file the following arguments:

[nuitka]
extra_args = --quiet --noinclude-qt-translations=True --windows-icon-from-ico=icons/icon.ico