QAbstractTableModel retrieve custom object on data changed
I have recently picked up Qt again, and started refreshing my memory. Creating a custom data model for a table was easy enough. Now I am trying to retrieve the selected data. Take note that I use custom data objects. Example of my custom model: platform.h class Platform { public: Platform(); Platform(QString name); QString getName(); void setName(QString name); private: QString m_name; }; Very simple data structure for testing purposes. I then implemented a QAbstractTableModel, the Data() method looks like this: platformmodel.cpp QVariant PlatformModel::data(const QModelIndex &index, int role)