[PyQt] Qt5.5 / PyQt5.5 on OS X - SVG not in supportedImageFormats

Phil Thompson phil at riverbankcomputing.com
Sun Jul 26 20:12:01 BST 2015


On 26/07/2015 8:06 pm, Marko Luther wrote:
> I compiled Qt 5.5 and PyQt 5.5 under Python 3.4 from source on OS X 
> 10.7.
> 
> QImageReader.supportedImageFormats() lacks the SVG entry and thus
> QIcon does not display SVG icons.
> 
> Under Qt 5.5 / PyQt 4.11.4 under the same Python 3.4 the SVG entry
> exists and the icons are displayed as expected. Same also on another
> machine running Qt 5.4.2 / PyQt 4.11.4 / Python 2.7.
> 
> Is there a trick to compile PyQt 5.5 with SVG support or do I need to
> import extra packages (eg. QtXml)? The underlying Qt 5.5 seems to have
> all the necessary modules plugins in place:
> 
> ~/Qt5.5.0/5.5/clang_64/plugins/iconengines/libqsvgicon.dylib
> ~/Qt5.5.0/5.5/clang_64/plugins/imageformats/libqsvg.dylib
> 
> On tracking the files open by the python process I see that none of
> those shared libs is opened on
> 
> # python3.4
>>>> from PyQt5.QtGui import QImageReader
>>>> print(QImageReader.supportedImageFormats())
> 
> but those for the other formats like libqtiff.dylib are opened.

Have you read the OS X specific notes in the PyQt docs?

Phil


More information about the PyQt mailing list