def removeTab(self, tab): ''' hide if there are no tabs ''' FwTabWidget.removeTab(self, tab) if self.count() == 0: self.hide()