def accept(self): title = self.titleLineEdit.text() year = self.yearSpinBox.value() minutes = self.minutesSpinBox.value() notes = self.notesTextEdit.toPlainText() if self.movie is None: acquired = self.acquiredDateEdit.date() self.movie = moviedata.Movie(title, year, minutes, acquired, notes) self.movies.add(self.movie) else: self.movies.updateMovie(self.movie, title, year, minutes, notes) QtWidgets.QDialog.accept(self)
def accept(self): title=self.lineEdit.text() year=self.spinBox.value() minutes=self.spinBox_2.value() locations=self.lineEdit_2.text() notes=self.plainTextEdit.toPlainText() # QMessageBox.warning(self,"Test",notes) if self.movie is None: acquired=self.dateEdit.date() self.movie=moviedata.Movie(title,year,minutes,acquired,locations,notes) self.movies.add(self.movie) else: self.movies.updateMovie(self.movie,title,year,minutes,locations,notes) QDialog.accept(self)