From: Ted D. <ted...@jp...> - 2005-02-14 22:43:56
|
John, Looks like that ctor was added in 3.2 of qt. Looking back through 3.0, I think you should be able to just change the line to look like this: a = qt.QAction( text, qt.QIconSet( image ), text, qt.QKeySequence('M'), self.window ) which is a ctor supported by even version 2.3 of qt. We tend to keep up w/ the latest versions of Qt pretty regularly. I may have to keep an old Qt/PyQt build around to test this stuff against... Ted At 02:08 PM 2/14/2005, John Hunter wrote: >With the updated qtagg backend, which worked fine on my OSX box but I >didn't test on my linux box, I get an error when trying to run a qtagg >plot (the previous backend does work on this box, so I think my qt >install is OK) > >The offending part is "argument 1" of > > a = qt.QAction( qt.QIconSet( image ), text, qt.QKeySequence('M'), > self.window ) > > >peds-pc311:~/python/projects/matplotlib> python examples/simple_plot.py >-dQtAgg --verbose-helpful >matplotlib data path /usr/local/share/matplotlib >loaded rc file /home/jdhunter/python/projects/matplotlib-cvs/.matplotlibrc >matplotlib version 0.72 >verbose.level helpful >interactive is False >platform is linux2 >numerix Numeric 23.6 >font search path ['/usr/local/share/matplotlib'] >loaded ttfcache file /home/jdhunter/.ttffont.cache >Could not load matplotlib icon: 'module' object has no attribute >'window_set_default_icon_from_file' >backend QtAgg version 0.9 >Traceback (most recent call last): > File "examples/simple_plot.py", line 5, in ? > figure(1) > File "/usr/local/lib/python2.3/site-packages/matplotlib/pylab.py", line > 828, in figure > figManager = new_figure_manager(num, figsize, dpi, facecolor, > edgecolor, frameon) > File > "/usr/local/lib/python2.3/site-packages/matplotlib/backends/backend_qtagg.py", > line 25, in new_figure_manager > return FigureManagerQT( canvas, num ) > File > "/usr/local/lib/python2.3/site-packages/matplotlib/backends/backend_qt.py" > , line 155, in __init__ > self.toolbar = NavigationToolbar2QT( canvas, self.window ) > File > "/usr/local/lib/python2.3/site-packages/matplotlib/backends/backend_qt.py" > , line 191, in __init__ > NavigationToolbar2.__init__( self, canvas ) > File > "/usr/local/lib/python2.3/site-packages/matplotlib/backend_bases.py", > line 896, in __init__ > self._init_toolbar() > File > "/usr/local/lib/python2.3/site-packages/matplotlib/backends/backend_qt.py" > , line 206, in _init_toolbar > self.window ) > File "/usr/local/lib/python2.3/site-packages/qt.py", line 67, in __init__ > libqtc.sipCallCtor(216,self,args) >TypeError: Argument 1 of QAction() has an invalid type > > >peds-pc311:~/python/projects/matplotlib> python >Python 2.3.3 (#2, Apr 13 2004, 17:41:29) >[GCC 3.3.3] on linux2 >Type "help", "copyright", "credits" or "license" for more information. > >>> import qt > >>> qt.PYQT_VERSION >199936 > > >Also, the original intent of the backend_version variable was to >report version info for the underlying toolkit. Eg > > backend_version = qt.PYQT_VERSION > >the backend is assumed to have the same version as the mpl parent. > >JDH > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >Matplotlib-devel mailing list >Mat...@li... >https://lists.sourceforge.net/lists/listinfo/matplotlib-devel Ted Drain Jet Propulsion Laboratory ted...@jp... |