Terminal says : ' Not Created By QtDesigner'

47 Views Asked by At

I am trying to convert a resources.qrc file to resources_rc.py file in order to use it in python.

When I write 'pyuic5.exe .\resources.qrc -o .\resources_rc.py' after opened the folder in terminal. And it throws that one : Error in input file: not created by Qt Designer

How can I fix that?

1

There are 1 best solutions below

0
TheHungryCub On

pyuic5 is typically used to convert Qt Designer UI files (.ui) to Python files, not resource files.

To convert a Qt resource file (.qrc) to a Python file (.py), you should use the pyrcc5 utility instead.

pyrcc5.exe resources.qrc -o resources_rc.py

After running this command, you should be able to use the generated resources_rc.py file in your Python code to access the resources defined in your .qrc file.