I'm trying to create a resource file for the GUI i'm creating with PyQt 5.
I've used the command line
pyrcc5 -o image_rc.py D:\MyFolder\resource_file.qrc
but i get an error message : No resources in resource description
This is how my resource file looks :
<!DOCTYPE RCC>
<RCC>
<qresource prefix="/images">
<file alias="img">Images\mypic.png</file>
</qresource>
</RCC>
I've followed this topic : python 3 how to put pics inside my program but i somehow have something wrong.
QUESTION : if i understand, when you have a resource file, you still need to have the images in a folder somewhere. So why bother making a resource file then ? Isn't the same ? The images can still be deleted or moved no ?
For anyone facing this issue in the future, here is how I solved it.
find the following batch file : pyuic5.bat
Which is a batch file, Edit it to add your own .ui file:
@"C:\Users\******\AppData\Local\Programs\Python\Python35-32\python" -m PyQt5.uic.pyuic %1 %2 %3 %4 %5 %6 %7 %8 %9 Design.ui -o Design.py
pause
Hit enter in the CMD, then the "Design.py" will be created in the folder.
Good Luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With