code: def paintEvent(self, event):
          
  
          super(type(self), self).paintEvent(event)
  
          show_message = True
          model = self.model()
          if issubclass(type(model), GraphModel):
              if model.has_nodes():
                  show_message = False
          elif issubclass(type(model), QAbstractItemModel) or \
                  issubclass(type(model), QAbstractListModel) or \
                  issubclass(type(model), QAbstractTableModel):
              if model.rowCount():
                  show_message = False
  
          if show_message:
              self.__notifier.show_message(self.__message, 0)
          else:
              self.__notifier.hide_message()
docs: Reimplements the :meth:`*.paintEvent` method.
  
          :param event: QEvent.
          :type event: QEvent