def sizeChange(self):
        docHeight = self.document().size().height()
        # add some margin to prevent auto scrollbars
        docHeight += 20
        if self.heightMin <= docHeight <= self.heightMax:
            self.setMaximumHeight(docHeight)
dataset/ETHPy150Open ejeschke/ginga/ginga/qtw/Widgets.py/GrowingTextEdit.sizeChange/original