Please forgive me if I’m raising a heretical question with this
since I
understand the topic of competing Qt bindings for Python gets a
little
touchy in and of itself. Nonetheless, the elephant is in the
room. I
searched the archives and found only a few comments on the
subject:
"
target=“_new”>>
Has there been any additional discussion among the developers
about
creating a formal backend for Pyside?
Its actually a fairly easy to get the PyQt backend working with
PySide. It would have been laughably easy if not for a couple of
bugs in PySide that took awhile to track down.
To get it working PySide working you need to:
It might also be a good idea to convert all the signals/slots into
the new style but it seems to work just fine with only the above
changes.
Regards,
Gerald.
···
matplotlib-users@lists.sourceforge.net/msg18652.htmlhttp://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg18652.html
-
Obviously replace the reference to PyQt with PySide
-
Remove the reference to PyQt/Pyside.Qt and Qt.qApp by
replacing it with QtGui.qApp (I think this is already done in
the most recent Git version) -
Replace the toolbar message signal with a new style signal by:
-
adding 'message = QtCore.Signal(str)' to the
NavigationToolbar2QT class definition
-
replacing: QtCore.QObject.connect(self.toolbar,
QtCore.SIGNAL(“message”),
self.window.statusBar().showMessage)
with:self.toolbar.message.connect(self.window.statusBar().showMessage)
-
replacing: self.emit(QtCore.SIGNAL(“message”), s)
with: self.message.emit(s)
-
Work around the PySide bug with QImage and convert the string
passed from the Agg backend into a python buffer with
buffer(stringBuffer) or wait for PySide to fix bug 489. -
Work around a PySide bug (738) by creating functions to
perform the slider.setMaxiumum/setMinimum tasks or ignore the
runtime errors for now and wait for a bug fix. -
I haven't bothered with the figure options editor at this
point - I just commented out the references to it.