self.setupUi (self)
def on_add_education (self):
- print "Education"
\ No newline at end of file
+ # check if the qualification title is set
+ if self.degree_name.text () == "":
+ PyQt4.QtGui.QMessageBox.critical (self, "Cannot add", "Some required fields are missing.")
+ else:
+ educationitem = PyQt4.QtGui.QTreeWidgetItem ([
+ self.degree_name.text (),
+ self.yearofpassing.date ().toString ("MMM, yyyy"),
+ self.institution.text (),
+ self.university.text (),
+ self.grade.text (),
+ str (self.percentage.value ())
+ ])
+ self.educationlist.addTopLevelItem (educationitem)
\ No newline at end of file