diff --git a/lib/matplotlib/backends/backend_qt5.py b/lib/matplotlib/backends/backend_qt5.py index c3e9d71ccfca..b92f545772bf 100644 --- a/lib/matplotlib/backends/backend_qt5.py +++ b/lib/matplotlib/backends/backend_qt5.py @@ -471,6 +471,10 @@ def __init__(self, canvas, num): else: tbs_height = 0 + # add text label to status bar + self.statusbar_label = QtWidgets.QLabel() + self.window.statusBar().addWidget(self.statusbar_label) + # resize the main window so it will display the canvas with the # requested size: cs = canvas.sizeHint() @@ -493,8 +497,7 @@ def notify_axes_change(fig): @QtCore.Slot() def _show_message(self, s): - # Fixes a PySide segfault. - self.window.statusBar().showMessage(s) + self.statusbar_label.setText(s) def full_screen_toggle(self): if self.window.isFullScreen():