开发者

pyqt4 Button image doesnt appear in .app

开发者 https://www.devze.com 2023-03-06 03:16 出处:网络
I create an .app using py2app, and the GUI was made with pyqt4, and one of the buttons has an image on ti, but when i run the app the image doesnt appear and wh开发者_JAVA技巧en i run it on the termin

I create an .app using py2app, and the GUI was made with pyqt4, and one of the buttons has an image on ti, but when i run the app the image doesnt appear and wh开发者_JAVA技巧en i run it on the terminal it appears, how can I solve this?

Thank you in advance


when you launch python setup.py py2app you can pass two extra arguments:

--iconfile path/to/icon.icns 
--resources path/to/other/required/stuff

With the first one you set the Dock and App icon, with the second one you embed other needed resources into the .app folder, so that they are available when the app is started.

0

精彩评论

暂无评论...
验证码 换一张
取 消