def __init__(self, text, parent=None): QtGui.QToolBar.__init__(self, text, parent) self.setVisible(False) self.toggleViewAction().setVisible(False)