This Qt5/C++ program will update and read my food database recording and displaying food consumed with the amount of their nutrients.  It will calculate the amounts based on the number of grams/millilitres eaten and the 100 gm values for that food item. Vitamins, calcium, iron and magnesium use a 100% method as they are commonly rated that way on food packaging.   The output is displayed in a QTable using a QStandardItemModel model. Initially I tried using a delegate to change cell colours. Got it working in small models in main.cpp but it failed when using the Creator ui-> method.  I gave up after spending over a day experimenting and using Google.  QDebug() showed the constructor being used but none of the methods. The same code would work though if I declared the objects in my code.   Found an easier solution: Used QPushButton in my cells and since it has properties, it was easy to add colour, etc.