(self, left, top, right, bottom)
Override to align function signature with first character.
Override to align function signature with first character.
Override to align function signature with first character .
def setViewportMargins(self, left, top, right, bottom):
        """
        Override to align function signature with first character.
        """
        super().setViewportMargins(left, top, right, bottom)

        cursor = QTextCursor(self.firstVisibleBlock())
        setPositionInBlock(cursor, 0)
        cursorRect = self.cursorRect(cursor).translated(0, 0)

        first_char_indent = self._marginWidth + \
                            self.contentsMargins().left() + \
                            cursorRect.left()

        self.viewport_margins_updated.emit(first_char_indent)
def setViewportMargins ( self , left , top , right , bottom ) : super ( ) . setViewportMargins ( left , top , right , bottom ) cursor = QTextCursor ( self . firstVisibleBlock ( ) ) setPositionInBlock ( cursor , 0 ) cursorRect = self . cursorRect ( cursor ) . translated ( 0 , 0 ) first_char_indent = self . _marginWidth + self . contentsMargins ( ) . left ( ) + cursorRect . left ( ) self . viewport_margins_updated . emit ( first_char_indent )