Dec-13-2022, 03:08 AM
I have an error that works if I print but not if I try to use the value. I've tried everything I can think of but can't understand what is going wrong.
I get a color from a QColordialog then try to get the string from it. The print statement shows "#000000" but then I get a QColor not callable error on the " Prefs.fontColor(_color)" line. Any clues?
I get a color from a QColordialog then try to get the string from it. The print statement shows "#000000" but then I get a QColor not callable error on the " Prefs.fontColor(_color)" line. Any clues?
def chooseColor(self): color = QColorDialog() color.setCurrentColor(Prefs.fontColor) color.exec() _color = color.currentColor() print(_color.name()) _color = str(_color.name()) Prefs.fontColor(_color) #and the Prefs part is @property def fontColor(self): return QColor.fromString(self._dict["fontColor"]) @fontColor.setter def fontColor(self,val): self._dict["fontColor"] = val