Importing json in listwid with colored text & after clearing the listwid and importing new data an error is prompted
Solved
Brainstorm
-
Hello,
Past couple of days i have been trying to color text which are already imported in listwid- i have created a json file in which all the data(dict) is stored
- i clear the existing data from the listwid, an error is prompted currently not the concern but still a point which needs to be fixed
# File "E:\Proj_Codes\NitinProj\vacuum_cleaner\vacuum_cleaner_delegate.py", line 47, in vacuum_cleaner_textedit_values # self.vacuum_cleaner_listwid.currentItem().text()))) # AttributeError: 'NoneType' object has no attribute 'text'
and import the updated data in the wid
3) so here is the issue after importing the new json data(dict) i want to show the wrong values in red and correct in green inside listwid
i know "listwidgetitem" but after reading json file i have no clue how can i apply color to text
This tool is for maya with pyside2vacuum_cleaner.py
https://github.com/blossomsg/NitinProj.gitsuggestions would be great and with an example would be cherry on the cake
Thank You.
-
Hi,
Check that the item returned by
currentItem()
is not None
and continue your code only if it's the case. -
This post is deleted!