Questions tagged [pyrcc]

Use this tag for questions about the PyQt resource compiler utility (pyrcc4 or pyrcc5)

From the PyQt documentation for pyrcc:

pyrcc is PyQt’s equivalent to Qt’s rcc utility and is used in exactly the same way. pyrcc reads the .qrc file, and the resource files, and generates a Python module that only needs to be imported by the application in order for those resources to be made available just as if they were the original files.

14 questions
6
votes
12 answers

labelImg: 'pyrcc5' is not recognized as an internal or external command

I'm trying to install lalbelImg for The Tensorflow Object Detection API. Everything is going well until I try to run the command: pyrcc5 -o libs/resources.py resources.qrc It give me error: 'pyrcc5' is not recognized as an internal or external…
code lover
  • 151
  • 1
  • 2
  • 9
4
votes
8 answers

How can resources be provided in PyQt6 (which has no pyrcc)?

The documentation for PyQt6 states that Support for Qt’s resource system has been removed (i.e. there is no pyrcc6). In light of this, how should one provide resources for a PyQt6 application?
biqqles
  • 303
  • 3
  • 10
1
vote
1 answer

Change the import path of rcc module from Qt Designer

I'm looking for a way to change the import path of the rcc module in the pyuic generated python file. An example pyuic generated python code from a ui file: from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): …
tonyjosi
  • 717
  • 1
  • 9
  • 17
1
vote
1 answer

i ussualy get a problem in "pyrcc5" is not recognized as an internal or external command, operable program or batch file

I am trying to convert qrc file to py but a module error comes up like this can we use another or alternative code for conversion?
1
vote
1 answer

How to restore resource.qrc file from resources_rc.py

As I am facing data loss, I have a corrupted resource.qrc file when I tried recovering it and I also lost my graphics files (.png, .jpg) - but my Qt application is running fine. The problem is when I need to edit the .ui files, I have a corrupted…
Aadit
  • 199
  • 1
  • 6
  • 17
1
vote
1 answer

can PIL open an image using pyqt4 resource file?

Can PIL open an image using pyqt4 resource file? from PIL import Image, ImageWin import res_rc #resource file image = Image.open(":/images/image.png") dim = ImageWin.Dib(image) I'm getting this error IOError: [Errno 22] invalid mode ('rb') or…
unice
  • 2,655
  • 5
  • 43
  • 78
1
vote
2 answers

Equivalent of pyrcc4 on KDE

Am working on a pyqt app, done the ui via qt-designer 4.8.1, and generated the corresponding py file using pykdeuic4 (available on OpenSuse 12.2), but can't find an equivalent for pyrcc4 to hadle the *.qrc files. what's the equivalent…
JWL
  • 13,591
  • 7
  • 57
  • 63
0
votes
0 answers

Problem after Create Setup file Python Project (PyQt5) with cx Freez in user

Several of my own projects, which are separate independent programs, were created by myself after converting the Python file to an exe file in my own system and virtual machines. I encounter an unknown error that I have not encountered before. The…
0
votes
1 answer

Couldn't compile resource file while making plugin in QGIS in mac. Pyrcc5 is not in your path error

I was trying to create a plugin in QGIS. I was following this. While trying to compile my resource file. I got pyrcc5 is not in your path---unable to compile your resource file(s) error. I searched everywhere but there were no valid solutions for…
0
votes
2 answers

no module named res_rc after compile res.qrc file using pyrrc5.exe

With Qt Creator I created a .ui file and set the main window icon referred to a .ico in res.qrc file. Then in PyCharm I used pyuic&pyrcc to convert qt files to .py files. However after I start up my app, I got an import error saying that No module…
Lisen
  • 168
  • 1
  • 2
  • 11
0
votes
0 answers

"No code object available" error when compiling .qrc file in PyQt5 using command line pyrcc

I am currently working on a PyQt5 project and following along with Martin Fitzpatrick's "Create GUI Applications with PyQt5", and I have encountered an error which seems a little confusing to me. I have used Qt Creator (v. 4.13) to create .ui and…
adouv
  • 38
  • 5
0
votes
1 answer

Calling pyuic4 in a for loop to generate all py files | Calling .bat from python

I want to create a short script that loops over all .ui and .qrc files in a folder, and calls pyuic4 and pyrcc4 respectively for each file thus generating the corresponding .py files. EDIT months later after i learned more python: import…
Andrei M.
  • 313
  • 2
  • 10
0
votes
0 answers

Are there practical size limitations to "compiled" resource files generated by PyQt?

I've been trying to bundle up some splash screens into a resource file (three of them, at around 350KB each) using pyrcc, but the resulting rc takes an unacceptable amount of time to import (about 1.2 seconds). I assume this is just a limitation of…
spencewah
  • 2,196
  • 4
  • 20
  • 31
0
votes
0 answers

PyQt4 Pyrcc Resource File Encoding

I am trying to embed resources to my PyQt4 application. However when I import the resource file that I create by using included pyrcc.exe I came accross encoding errors. Pyrcc already adds the UTF-8 encoding line on top of the file as this was the…