PyQt5-YOLOv5
PyQt5-YOLOv5 copied to clipboard
更换背景图片
你好,请问一下那些图标 照片该怎样更换,我把icon下的照片对应替换之后并没有效果
同问
同问,是ui文件修改后需要编译吗
问题已解决,需要重新生成的qrc文件转换为py文件,然后再ui转换的py文件import生成的qrc转换的py文件
将ui文件使用 pyuic5 win.ui > win.py 执行
问题已解决,需要重新生成的qrc文件转换为py文件,然后再ui转换的py文件import生成的qrc转换的py文件
你好,能仔细讲解一下,没看懂。具体怎样更换这些图标
问题已解决,需要重新生成的qrc文件转换为py文件,然后再ui转换的py文件import生成的qrc转换的py文件
你好,能仔细讲解一下,没看懂。具体怎样更换这些图标 @xxxjjjx @xing-bing Let me explain it by taking an example of changing an icon:
- Edit the .ui file (.ui file could open with QtDesigner). You can install the QtDesigner by
pip install pyqt5-tools
- Generate the .py file using pyuic5
pyuic5 yourfile.ui -o yourfile.py
- I found that the icon is not showing. The relative paths in the .ui file cause the issue.
Thus, you need to add icon paths to the .qrc, i.e.
apprcc.qrc
- Generate the
apprcc_rc.py file
from theapprcc.qrc
, usingpyrcc5 apprcc.qrc -o apprcc_rc.py
- Run main.py to check it