code: def getData(self):
          
          text = self.lineEditor.text()
          if not text.startswith('#'):
              text = '#' + text
  
          validator = self.lineEditor.validator()
          if validator is not None:
              state, text, _ = validator.validate(text, 0)
              if state != QtGui.QValidator.Acceptable:
                  raise InvalidInputError("Invalid input: {!r}".format(text))
  
          return  QtGui.QColor(text)
docs: Gets data from the editor widget.