[PyQt] QLibraryInfo and images

David Boddie david at boddie.org.uk
Tue Oct 6 01:58:30 BST 2009


On Thu, 1 Oct 2009 23:04:49 -0700, Scott Frankel wrote:

> Can a qt.conf file be used to specify an images directory using the  
> QLibraryInfo.LibraryLocation enum?

Maybe you could use the Data entry for images:

  http://doc.trolltech.com/4.5/qt-conf.html

> I wonder if I'm barking up the right tree.  My app displays images  
> that have been compiled as resources (.png, .tif, or .jpg) without  
> issue on Fedora and Windows.  But it doesn't display them on OSX.  
> (Note that I'm using a qt.conf file in my OSX app bundle to locate a  
> plugins dir.)

So, I guess you're packaging your application along with Qt and PyQt in a
bundle and I assume that support for images is built as plugins, and I'm
guessing that some misconfiguration is causing this to fail.

> The enum docs (http://doc.trolltech.com/4.4/qlibraryinfo.html) aren't  
> specific about image data and my tests at possible syntax haven't  
> yielded any positive results.

The QLibraryInfo class and your resource files are two separate things - I
assume that by "resources" you mean you compiled your image files to Python
modules using pyrcc4. Is that the case?

David



More information about the PyQt mailing list