def init(self, parent): """ Finishes initializing the editor by creating the underlying toolkit widget. """ self.control = QtGui.QCalendarWidget() if not self.factory.allow_future: self.control.setMaximumDate(QtCore.QDate.currentDate()) self.control.clicked.connect(self.update_object)
def init(self, parent): self.control = QtGui.QCalendarWidget() if not self.factory.allow_future: self.control.setMaximumDate(QtCore.QDate.currentDate()) if not self.factory.allow_past: self.control.setMinimumDate(QtCore.QDate.currentDate()) if self.factory.dates_trait and self.factory.styles_trait: self.sync_value(self.factory.dates_trait, "dates", "from") self.sync_value(self.factory.styles_trait, "styles", "from") self.control.clicked.connect(self.update_object) return