X-Git-Url: https://harishankar.org/repos/?p=biacv.git;a=blobdiff_plain;f=biacv_mainwindow.py;h=3133477e46302ba76751eafbffc655ccfa5b6c91;hp=5b27e6d8bfa9751a99d5430160fbaaa287781e48;hb=ad773b422b8a5777bdf39df8d65d2825c89ec39e;hpb=55e67ef107163647d9e97ea060221ac8f70fb85e diff --git a/biacv_mainwindow.py b/biacv_mainwindow.py index 5b27e6d..3133477 100644 --- a/biacv_mainwindow.py +++ b/biacv_mainwindow.py @@ -9,4 +9,16 @@ class Biacv_mainwindow (PyQt4.QtGui.QMainWindow, bui.Ui_biacv_mainwindow): 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