def update_tab_bar_visibility(self):
if self.tab_widget.count() <= <NUM_LIT:1>:<EOL><INDENT>self.tab_widget.tabBar().setVisible(False)<EOL><DEDENT>else:<EOL><INDENT>self.tab_widget.tabBar().setVisible(True)<EOL><DEDENT>if self.tab_widget.count()==<NUM_LIT:0> :<EOL><INDENT>self.close()<EOL><DEDENT>
update visibility of the tabBar depending of the number of tab

        0 or 1 tab, tabBar hidden
        2+ tabs, tabBar visible

        send a self.close if number of tab ==0

        need to be called explicitly, or be connected to tabInserted/tabRemoved