Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions lib/matplotlib/backends/backend_qt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,18 +474,18 @@ def __init__(self, canvas, num):

self.window._destroying = False

# add text label to status bar
self.statusbar_label = QtWidgets.QLabel()
self.window.statusBar().addWidget(self.statusbar_label)

self.toolbar = self._get_toolbar(self.canvas, self.window)
if self.toolbar is not None:
self.window.addToolBar(self.toolbar)
self.toolbar.message.connect(self._show_message)
self.toolbar.message.connect(self.statusbar_label.setText)
tbs_height = self.toolbar.sizeHint().height()
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()
Expand All @@ -507,10 +507,6 @@ def notify_axes_change(fig):
self.canvas.figure.add_axobserver(notify_axes_change)
self.window.raise_()

@QtCore.Slot()
def _show_message(self, s):
self.statusbar_label.setText(s)

def full_screen_toggle(self):
if self.window.isFullScreen():
self.window.showNormal()
Expand Down