code: def accept(self):
          
          for index in range(self.pages_widget.count()):
              configpage = self.get_page(index)
              if not configpage.is_valid():
                  return
              configpage.apply_changes()
          QDialog.accept(self)
docs: Reimplement Qt method