The model should provide this information for you. Create a role in the model which will return the correct value for any given cell. On QML side, just access that role and display it directly. No need for any get() method (which, by the way, is called data() https://doc.qt.io/qt-5/qabstractitemmodel.html#data, not get()).