parameters: (self, widget)
docstring: Add widget.
docstring_summary: Add widget.
docstring_tokens: Add widget .
function: def add_widget(self, widget):
          ''' Add widget.'''
          # Init background color before addWidget.
          if not hasattr(self, "background_color"):
              self.background_color = QColor(self.theme_background_color)
  
          self.buffer_widget = widget
          self.addWidget(self.buffer_widget)
  
          self.buffer_widget.installEventFilter(self)
  
          self.buffer_widget.buffer = self
function_tokens: def add_widget ( self , widget ) : # Init background color before addWidget. if not hasattr ( self , "background_color" ) : self . background_color = QColor ( self . theme_background_color ) self . buffer_widget = widget self . addWidget ( self . buffer_widget ) self . buffer_widget . installEventFilter ( self ) self . buffer_widget . buffer = self