code: def add_dockwidget(self, child):
          
          dockwidget, location = child.create_dockwidget()
          if CONF.get('main', 'vertical_dockwidget_titlebars'):
              dockwidget.setFeatures(dockwidget.features()|
                                     QDockWidget.DockWidgetVerticalTitleBar)
          self.addDockWidget(location, dockwidget)
          self.widgetlist.append(child)
docs: Add QDockWidget and toggleViewAction