Hi wysota,
Thank you, that helps clarify things. You recommended I "connect to the model's event." What event would that be? Would you recommend instead that I add Q_PROPERTYs to the _arrivingVisitorModel class that are always connected to the property of the current model index? In other words, something like
Qt Code:
// visitormodel.h { Q_OBJECT // ... void setVin(const QString& vin); // ... signals: // ... private: QList<VehicleItem*> m_list; }; // visitormodel.cpp { return m_list[currentIndex].vin(); } void VisitorModel::setVin(const QString& vin) { if(m_list[currentIndex].vin() != vin) { m_list[currentIndex].setVin(vin); emit vinChanged(); emit dataChanged(); } }To copy to clipboard, switch view to plain text mode
In general, what is the recommended approach for communicating individual property/data member changes of each item in a QAbstractListModel-derived model to QML?
Bookmarks