Add pyqt5 support for MatplotlibWidget
This commit is contained in:
parent
478a3b1aa4
commit
00092d99d4
@ -1,11 +1,16 @@
|
||||
from ..Qt import QtGui, QtCore, USE_PYSIDE
|
||||
from ..Qt import QtGui, QtCore, USE_PYSIDE, USE_PYQT5
|
||||
import matplotlib
|
||||
|
||||
if not USE_PYQT5:
|
||||
if USE_PYSIDE:
|
||||
matplotlib.rcParams['backend.qt4']='PySide'
|
||||
|
||||
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
|
||||
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar
|
||||
else:
|
||||
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
|
||||
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
|
||||
|
||||
from matplotlib.figure import Figure
|
||||
|
||||
class MatplotlibWidget(QtGui.QWidget):
|
||||
|
Loading…
Reference in New Issue
Block a user