Example #1
0
 def focusOutEvent(self, event): #Override
     if self.text() == '':
         Progress.statuses['DirectoryChanged'] = True
         QLineEdit.focusOutEvent(self, event)
         return
     fm = FileManip()
     if fm.VerifyExists(self.text()) != True:
         QMessageBox.warning(self, 'Error',
                             "The path you specified cannot be located.\n\n Could not find: \"{}\"".format(self.text()),
                             QMessageBox.Ok)
         self.setFocus()
         return
     Progress.statuses['DirectoryChanged'] = True
     QLineEdit.focusOutEvent(self, event)
Example #2
0
	def focusOutEvent(self, event):
		if not self.right_clicked:
			if self.text() != self.init_value:
				command = CommandEdit(self, self.init_value, self.node, self.mw, "editing {0} in {1}".format(self.label, self.node.name))
				self.mw.undo_group.activeStack().push(command)
			QLineEdit.focusOutEvent(self, event)