简体   繁体   中英

I had Created an app in pyqt it have icons .I'm using pyinstaller to make it exe how can i add icon in Exe

import sys
from PyQt5.QtWidgets import QApplication, QWidget


app = QApplication(sys.argv)

window = QWidget()
window.show() # IMPORTANT!!!!! Windows are hidden by default.

# Start the event loop.
app.exec_()

use command --icon while creating exe

<<cmd your path >>$pyinstaller --noconsole --icon "c:\icon.ico" pythoncode.py

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM