Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 34e6775

Browse files
authored
Merge pull request #14703 from anntzer/qtwinsize
Don't bother with manually resizing the Qt main window.
2 parents 1f6f05b + e6367c9 commit 34e6775

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

lib/matplotlib/backends/backend_qt5.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -572,16 +572,6 @@ def __init__(self, canvas, num):
572572
statusbar_label = QtWidgets.QLabel()
573573
self.window.statusBar().addWidget(statusbar_label)
574574
self.toolbar.message.connect(statusbar_label.setText)
575-
tbs_height = self.toolbar.sizeHint().height()
576-
else:
577-
tbs_height = 0
578-
579-
# resize the main window so it will display the canvas with the
580-
# requested size:
581-
cs = canvas.sizeHint()
582-
sbs = self.window.statusBar().sizeHint()
583-
height = cs.height() + tbs_height + sbs.height()
584-
self.window.resize(cs.width(), height)
585575

586576
self.window.setCentralWidget(self.canvas)
587577

0 commit comments

Comments
 (0)