Archive for March 23rd, 2009

qrc file?

March 23rd, 2009 1 comment

Just started working on this new project and ran into a filetype — and an issue — I’ve never ran into before. The file’s extension is “qrc” and it’s doctype is “RCC”, but it looks very much like a straight up XML file. I did a little lookup and found out it’s Qt’s “resource system.” Qt is a set of libraries written in C++ that includes GUI, networking, thread, and many other utilities. The resource system lets you embed different types of files into your programs more easily. These “resources” are then “part of” your program… Instead of having to figure out a way to store an image somewhere and then make the connection to your program, the image becomes actually part of your software.

I had to take the “resources.qrc” file that was in the codebase and convert it to python (since I’m using PyQt). The command to convert “resources.qrc” to “” is as simple as:

pyrcc4 -o resources.qrc

PyQT 4 Ref

Categories: Python Tags: