Access QVector<type> from QML
Unsolved
QML and Qt Quick
-
Hi everyone,
So in QtQuick, I have many QVector<T> with T being a normal class, for instance:
class Person { public: Person(); void setName(QString); void setAge(int); void setSize(float); QString getName(); int getAge(); float getSize(); signals: public slots: private slots: private: QString name; int age; float size; }
I would like to access those data from my QML. What would be the best way to do that? Concidering I could also have some QVector<T> with T being
class Children : public Person { public: Children(Person *parent = nullptr); signals: public slots: private slots: private: }
Thanks for advices and feedbacks
-
-
@raven-worx Thank you for this answer. In fact I already found this example but wouldn't this be a problem if my Person class is in a vector?