- now using QAbstractItem model - added error handling so the app doesn't crash anymore when the data is invalid