[PyQt] Qt5.5 / PyQt5.5 on OS X - SVG not in supportedImageFormats
Marko Luther
marko.luther at gmx.net
Sun Jul 26 20:45:33 BST 2015
Phil,
thanks for that super fast reply. Of course I did not read that (although on the top of the document). Sorry.
So I understand that this is a runtime issue. I typed
# export DYLD_FRAMEWORK_PATH=~/Qt5.5.0/5.5/clang_64/lib/
# python3.4
>>> from PyQt5.QtGui import QImageReader
>>> print(QImageReader.supportedImageFormats())
and now I have "svg" and "svgz" among the results and the SVG QIcon are rendered as expected.
Thanks a lot for that quick help (and also for that wonderful software),
Marko
On 26.07.2015, at 21:12, Phil Thompson wrote:
> 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
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list