Skip to content

Commit

Permalink
Make sure the dialog is wide enough when called from PyMcaBatch
Browse files Browse the repository at this point in the history
  • Loading branch information
vasole committed Apr 8, 2021
1 parent ce9da04 commit 4d7311a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions PyMca5/PyMcaGui/io/hdf5/QNexusWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ def __init__(self, parent=None, mca=False, buttons=False):
self._BUTTONS = buttons
self.build()

def sizeHint(self):
originalHint = qt.QWidget.sizeHint(self)
if isinstance(self.parent(), qt.QDialog):
return qt.QSize(2 * originalHint.width(),
originalHint.height())
else:
return qt.QSize(originalHint.width(),
originalHint.height())
def build(self):
self.mainLayout = qt.QVBoxLayout(self)
self.mainLayout.setContentsMargins(5, 5, 5, 0)
Expand Down

0 comments on commit 4d7311a

Please sign in to comment.