'Defer updating widgets until the widget is visible'

def showEvent(self, event):

    if (not self._active):
        self._active = True
        self.refresh()
    return super(BranchesTreeWidget, self).showEvent(event)
