code: def init_layout(self):
          
          parent = self.parent()
          if parent is not None:
              self.adapter = parent.adapter
              self.adapter.addFragment(self.fragment)
docs: Initialize the layout of the toolkit widget.
  
          This method is called during the bottom-up pass. This method
          should initialize the layout of the widget. The child widgets
          will be fully initialized and layed out when this is called.