code: def eventFilter(self, object, event):
          
          if event.type() in (event.Move, event.Resize):
              if self.isVisible():
                  self.rebuild()
              elif object.isVisible():
                  self.setVisible(True)
          
          return False
docs: Filters the parent objects events to rebuild this toolbar when
          the widget resizes.
          
          :param      object | <QObject>
                      event | <QEvent>