[Python] python pyinstaller pyqt add custom icons to the interface

Discussão em 'Python' iniciado por Stack, Fevereiro 27, 2025.

  1. Stack

    Stack Membro Participativo

    I have searched everywhere, I can't figure out how to add my own icons to the interface.

    I don't need to know how to change the application icon or the title bar, what I need is for PyInstaller to add to the executable the images I use for buttons in the GUI once compiled.

    The best I found was this, but it doesn't work:

    pyinstaller --clean --onefile --noconsole --icon="media/icon.png" -i="media/icon.png" --add-data="media/*;." main.py

    That my icons are shown in the buttons, but not the default PyQt icons, but the customized ones.

    Continue reading...

Compartilhe esta Página