May 2019
Intermediate to advanced
542 pages
13h 37m
English
The rest of our required automation doesn't map to built-in Qt slots, so before we can connect any more signals, we'll need to create some methods that will be used to implement the slots. We'll create all these as methods of the MainWindow class.
Before we start with the callbacks, we'll create a utility method to clear out the form, which several of the callback methods will need. It looks like this:
def clear_form(self): self.event_title.clear() self.event_category.setCurrentIndex(0) self.event_time.setTime(qtc.QTime(8, 0)) self.allday_check.setChecked(False) self.event_detail.setPlainText('')
Essentially, this method goes through the fields in our form and sets them all to default values. ...
Read now
Unlock full access