PyQt5-YOLOv5 icon indicating copy to clipboard operation
PyQt5-YOLOv5 copied to clipboard

更换背景图片

Open xing-bing opened this issue 2 years ago • 6 comments

你好,请问一下那些图标 照片该怎样更换,我把icon下的照片对应替换之后并没有效果

xing-bing avatar Aug 30 '22 03:08 xing-bing

同问

GHigher12 avatar Sep 17 '22 06:09 GHigher12

同问,是ui文件修改后需要编译吗

winqihe avatar Sep 29 '22 03:09 winqihe

问题已解决,需要重新生成的qrc文件转换为py文件,然后再ui转换的py文件import生成的qrc转换的py文件

GHigher12 avatar Sep 29 '22 03:09 GHigher12

将ui文件使用 pyuic5 win.ui > win.py 执行

winqihe avatar Sep 29 '22 14:09 winqihe

问题已解决,需要重新生成的qrc文件转换为py文件,然后再ui转换的py文件import生成的qrc转换的py文件

你好,能仔细讲解一下,没看懂。具体怎样更换这些图标

xxxjjjx avatar Dec 12 '22 05:12 xxxjjjx

问题已解决,需要重新生成的qrc文件转换为py文件,然后再ui转换的py文件import生成的qrc转换的py文件

你好,能仔细讲解一下,没看懂。具体怎样更换这些图标 @xxxjjjx @xing-bing Let me explain it by taking an example of changing an icon:

  1. Edit the .ui file (.ui file could open with QtDesigner). You can install the QtDesigner by pip install pyqt5-tools
  2. Generate the .py file using pyuic5 pyuic5 yourfile.ui -o yourfile.py
  3. 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
  4. Generate the apprcc_rc.py file from the apprcc.qrc , using pyrcc5 apprcc.qrc -o apprcc_rc.py
  5. Run main.py to check it

lpc-eol avatar May 29 '23 09:05 lpc-eol