<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def showEvent(self, event):
 """ Overrides showEvent to update the viewport margins """

        super(CodeEdit, self).showEvent(event)
        self.panels.refresh()