Hello,

I had an issue before with either py2exe or pyinstaller.
Packing matplotlib toolbar in a single file .exe make disappear most
of the icons on this toolbar.

The issue is only seen with .svg icon file.
.png are ok.
(I use also pyqt)

Here is dirty patch, add this to your own code:

from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg
as NavigationToolbar

class VMToolbar(NavigationToolbar):

    def __init__(self, plotCanvas, parent):
        NavigationToolbar.__init__(self, plotCanvas, parent)

    def _icon(self, name):
        #dirty hack to use exclusively .png and thus avoid .svg usage
        #because .exe generation is problematic with .svg
        name = name.replace('.svg','.png')
        return QIcon(os.path.join(self.basedir, name))

Well this is far from perfect but at least it avoid the issue if your
are like me in a urge to release a .exe :)

Cheers,
Laurent

--

You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.


Reply via email to