code: def reset_window_layout(self):
          
          answer = QMessageBox.warning(self, _("Warning"),
                       _("Window layout will be reset to default settings: "
                         "this affects window position, size and dockwidgets.\n"
                         "Do you want to continue?"),
                       QMessageBox.Yes | QMessageBox.No)
          if answer == QMessageBox.Yes:
              self.setup_layout(default=True)
docs: Reset window layout to default