View, edit and update data (from C++ ) in QML with multiple views, while the Data stays in C++ (subscribe to data)
I have some data stored in instances of a C++ class (Data.cpp). Now i want to be able to view and edit this data from 2 seperate representations in QML, so that if the values in View1 are changed, the data itself (C++) is changed and the value displayed by View2 as well (because it gets notified when the C++ data changes). Here is what I got so far: Data.h class Data : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) public: Data(std::string name); QString name(); void setName(const QString &n); signals: void nameChanged(); private: std::string