'Update the text based on the given tab.'

def on_tab_changed(self, tab):

    text = ''
    if tab.history.can_go_back():
        text += '<'
    if tab.history.can_go_forward():
        text += '>'
    if text:
        text = (('[' + text) + ']')
    self.setText(text)
    self.setVisible(bool(text))
